If the box is just cracked at the screw hole I've used PVC cement to repair it. (Plastic boxes are made of PVC). If plastic is missing/broken off I've torn the box out of the wall and replaced it with a Smartbox.

It takes a little bit of practice to get a damaged box out of the wall without damaging the drywall but it can be done. The important thing is to get the nails off the box while it's still in the wall--a long screwdriver is useful for that, just push them out and let them drop back in the wall.

Sometimes with the Smartboxes the sheath on the romex cable is too short to reach the box due to it's design--I apply heat-shrink tubing to the romex to replace the sheath. Not sure what else I can do?