Pujyapad Puri Shankaracharyaji asks us to avoid condemning or criticizing those who have less external detachment.
In the Srimad Bhagavatam this principle has been explained, that he who defines/portrays and condemns the character, nature, guna-dosha, and actions of others, gets the disease of “chhoot”. This implies that a person indulging in this, shall be influenced by the very same guna-doshas he talks about in others (they are highly infectious and we attract them).
When we study guna-dosha we must be mindful. Who we praise, we will come under the influence of, and what we criticize, those qualities/aspects shall be drawn into our own lives.
If there is divinity in someone, you may praise but if someone has undesirable qualities, do not condemn (due to the above reason). We must take the teaching that we wish not to be a certain way (from the wrong behaviour/qualities of others).
In olden times, saints said that if you condemn someone today, you may have to praise them tomorrow for what they do and those who you praise today may be worthy of condemnation tomorrow, due to their actions.