// Post Status Notes

We don’t need no stinkin’ standards!

I wonder how much WordPress is an outlier in even the PHP universe for tolerating the idea that it’s “punishment” and “unfair” to be held to a standard with mandatory testing for code that’s admitted to the WordPress.org repo for use on potentially 40% of the web. That’s how a number of developers responded to Felix Arntz‘s proposal for a plugin checker tool:

It should cover various aspects of plugin development, from basic requirements like correct usage of internationalization functions to accessibility, performance, and security best practices.

Brian Coords wrote a whole post about this:

…the biggest controversy seems to be whether this new [testing] tool [for plugins submitted to wordpress.org] will be used to unfairly punish developers who use a different coding standard (either out of preference or sometimes out of necessity).

Brian Coords, MasterWP

Except there was no reason for controversy. A small one emerged in the comments on Felix’s proposal only because the waters were quickly muddied as to whether he was proposing to enforce coding standards and/or styles. Although he didn’t use either term, a number of developers worried or assumed his proposal might go far beyond what he had described. In multiple replies to comments, Felix reiterated his goals and emphasized that coding style would not be enforced by this proposed testing tool — the focus is on security and performance. (He was pretty clear about this up front, however.)

One thing that emerged in the unnecessary reactions is helpful to understand — as Brian pointed out to me, the WordPress PHP Coding Standards (mandatory for core but recommended everywhere else) include elements of style:

While themes and plugins may choose to follow a different coding style, these coding standards are not just about code style, but also encompass established best practices regarding interoperability, translatability, and security in the WordPress ecosystem, so, even when using a different code style, we recommend you still adhere to the WordPress Coding Standards in regard to these best practices.

WordPress PHP Coding Standards

If it’s possible to hold plugins and themes to a generally agreeable standard (especially around security and performance) apart from coding style — which seems to be the point of Felix’s proposal — that would be a huge benefit to everyone. If the performance hogs and security failures that could be prevented by having a minimum mandatory standard is a non-zero number, it’s a net gain for some trivial ego pain. So I’m glad to see there was generally enthusiastic support for this.