[#1002] Code cleanups to catch fixable plugins and reduce code duplication