I think I'm going to stop inviting my friend over to my house.
Why do you want to stop inviting your friend over to your house?
He constantly makes comments about the size and condition of my home and it's offensive.
If he's critical of your home and it makes you uncomfortable, then it's fine to not extend and invitation to him. It's your home and you should have guests that are happy to be invited.
I'll try to say mean things about his home and family when he bothers me.
Yu shouldn't try to get payback, but just be honest with him. Tell him how much your comments hurt your feelings and that you don't want to invite someone over that's so critical.