Since Moodle 2.0, the $DB->delete_records() method always return true. If some problem is found, it throws exception.
So code like this:
Has no sense at all. Review all the current uses and change them to be linear / add extra checks if needed.
Tip: grep -r "if" * | grep delete_records