As usual Howard E. beat me to it with all the advice anyone could need. His rat control 101 thread is a gold mine of info on rats. And the basics are protect the bulk feed, protect the feed in the coop, and clean up around the coop so the rats have fewer places to hide. Once you have done this sanitation work killing them isn't necessary but if you want to the poison is much more effective.
Once under the coop it is tough to get them out. But within a day of controlling your feed the rats will become desperate. In my case, four days later they were staggering around in the back yard and my two dogs were killing dozens of them. I saw an article this morning about big cities and the CCP virus and the effect on the rats. They were out in the streets foraging for food, next step is fighting over territory where any food is still present, and the rats cannibalizing their young. The public health official said the same thing on the poison bait, when rats are starving they are not as picky and will take the bait.
Now the basics of a treadle feeder have not changed. To get 60% five star rating something like the grandpa feeder or one of the other clones will do fine, it isn't rat proof, the lid pushes up with very little force. For many people it will solve the problem until the rats learn where the feed is stored and how to lift the lid. If you want to get to a 90% five star rating you gotta spend some money as a manufacturer. The counterweight is needed, as is a narrow and distant treadle, and you need a spring to provide some initial resistance to a rat just pushing on the door. And that missing 10% are the ones that refuse to follow the instructions or ding you two points because the instructions were too long, too short, not enough pictures, choose one.
On any treadle feeder make sure the treadle touches the ground so it isn't shaky. Make sure it is solidly attached to a wall or post for the same reasons and so it doesn't flip over when empty. Remove all other feed, including free range during the training. The birds HAVE to be hungry but if you have done the things above they can be hungry for a few hours and have the motivation to learn.
If you have small birds both in weight and size you will need to add a step and tinker with the balance but the more you move that treadle toward the feed the less reach is needed to get to the feed and still hold the treadle down and the lighter the action the easier it is for a rat to just push the door open. If you have a mixed flock, my advice is to just let the smaller birds learn to eat when the other birds eat. I would get the soft close version so they have a second or two extra to skedadle out of the way. I would block off access to the sides so they are forced to come in from the front. For pure banty flocks, anything is better than nothing, get a duck step and plan on tinkering with the balance and adding/subtracting weight till you make it work for them and then slowly move the duck step back every week and slowly increase the weight till some but not all can use the feeder.
And never, ever, leave a treadle feeder open for training. You just teach the rats and mice and ground squirrels where the feed is stored. There are a lot of crap feeders on the market that achieve a 60% five star rating simply because the rats don't realize they can just push the door open due to the lack of a counterweight and a spring loaded door.
Lastly, no feeder is going to be perfect. My feeder is ugly as sin and a bit crude. Other feeders are pretty. Mine could be pretty if people were willing to spend as much as the grandpa feeders sell for. But that isn't my target demographic. Well designed is just cheap enough that it works but doesn't break or fails to do the job. Anything you spend over that is just vanity and it costs you sales.
No feeder is perfectly safe either, no moving machine is 100% safe from injuring a bird. Neither is having rats, mice, wild birds, or squirrels bringing in disease and pests like lice or mites or killing chicks and stealing eggs. All come with a risk, a chicken is usually right on the precipice of being over come by disease that is already present which is why you should quarantine a bird for a week or two when you move it. It already has the disease present but dormant, being held in check by a healthy immune system but you move the bird and the stress just barely tips the balance and the disease blooms and spreads to the rest of the flock. Same with a complicated feeder with a lid that comes up and down or back and forth, if it is possible some chicken will find a way to get stuck or cut if enough birds are using enough feeder. So pick your poison, take a tiny risk of a moving machine or take the much larger risk of dealing with constant sources of disease and pests coming and going.