Is this an okay thing to do?

I saw that at a house I was working on but I thought this wasn’t a good idea? If this is fine to do I will do it to one of mine, it’s on a very dusty side of the house.