WP Enforcer

This plugin enforces coding standards designed to ensure that code produced is consistent and in line with best practice.

When writing for a platform as big as WordPress – especially in a team environment – a consistent set of coding standards is vital. Having multiple developers committing code using a mixture of spaces and tabs, inconsistent formatting, or otherwise varying coding styles can lead to headache-inducing merge conflicts.

Content on this page is based on https://github.com/Angrycreative/wp-enforcer correct as of 

User experience

WP Enforcer uses Git Hooks to automatically run PHP_CodeSniffer every time a developer tries to make a commit; if the code isn’t up-to-snuff, the commit will be rejected and the developer will get a message explaining what needs to be fixed.

Benefits

  • Maximises developer efficiency
  • Ensure code quality
  • Standards compliance makes it easier to onboard other developers
  • Part of security and accessibility practices

Dependencies

  1. WordPress
  2. Qala infrastructure (or another git repository)

Related Qala features