Using Coding Standards with WordPress The goal is to make it as easy as possible to determine which set of coding standards to use.

I write a fair amount about coding standards with WordPress and the importance that I believe they have for individuals, teams, and with working with the core application, that being WordPress itself.

Coding Standards with WordPress: The WordPress Coding Standards

In the last year or so, I’ve moved away from working primarily with the WordPress Coding Standards and have begun to use PHP Standard Recommendations for coding.

Coding Standards with WordPress: PSR

Note that I did not say I abandoned the WordPress Coding Standards nor that I elevate the PSR recommendations above them, but I have reasons for when I use each. And for anyone working with WordPress-based projects, I think it’s important to recognize when it’s appropriate to use each.

And that’s the purposes of this post.

Coding Standards with WordPress

Before I discuss each of the variants in coding standards, I want to be clear that nothing I’m saying should be taken as a hard and fast rule. At best, perhaps a rule of thumb. At worst, completely ignored, right? 🙃

Seriously, though, despite the usual efforts and talking points of making a case for one standard over the other, I hold the opinion that there’s a time and a place for when each should be used.

⚠️ Hey, Wait!

Thanks for your interest in this article! Note that it's available to members only. If you'd like to review this (and have access to all previous and future articles), check out the membership benefits.

A Final Post?

Before wrapping up this series, I want to provide a list of additional resources that I believe are useful for those who are working with WordPress in some capacity.

Maybe you’re ane experienced developer, maybe you’re just getting standard, or maybe you’re somewhere in between.

Regardless, there’s something for all of us, and if I can share as much information as possible to help you become a better independent WordPress development, then I’ll be achieving a portion of the aim that I’ve set out with this particular series.

For now, though, give some thought to the outline of the coding standards above and see if it doesn’t help with managing some of your existing projects.

A Note About Object-Oriented Programming

Note also that earlier this week, I began – or resumed, depending on how long you’ve been reading this material – on object-oriented programming in WordPress. So if you’re interested in jumping into that as well, then you can start with this post (as it also references some of the others, too).