Look for warning signs, such as an old plugin repository, bad reviews, a bad developer reputation, few active installations, incompatibility with the latest WordPress version, and no recent updates.
If a plugin does not have these warning signs, it is likely safe. Read reviews to confirm.