I have 3 plastic compost bins, unfortunately they don't have bottoms so rats were tunneling underneath them it was a long time before I noticed a rats tail in there but there would always be a tunnel to the top of the compost. I became more careful about what I was putting in the bins, before I had been putting all waste food in them, pasta, rice, pieces of meat. I stopped that and only put in vegetable peelings. The rats went away but I had much less compost. So I got my other half to build a concrete base for one of the bins at the end of the garden and we put anything that might attract rodents in that, the bins have a catch on the lids so there is no way in for them.