Laws designed to protect the environment are only useful if they’re enforced — and in the state of Massachusetts, they often are not. Indeed, the Bay State has one of the nation’s worst enforcement records, according to a new federal website that allows the public to monitor enforcement of anti-pollution laws. Only 27 percent of Massachusetts factories, power plants, hazardous waste transporters, and other facilities with major environmental permits have been inspected in the last two years. (The national average is 44.5 percent.) And the situation is even worse in minority neighborhoods, where just 15 percent of major facilities have been inspected in that same time period. Environmentalists say infrequent inspections give free rein to polluters, but state and federal officials defended themselves by saying the seemingly poor record was the result of a deliberate strategy to target likely polluters too small to be classified as major facilities.