When it comes to writing code specifically for WordPress, I try my best to follow a combination of the WordPress coding standards, tips and advice from various books I’ve read (which I hope to cover in a future post), tips from others in the community, and certain habits that I’ve developed along way the way.
The thing that I’ve always struggled with determining is what constitutes clean code. There is code that follows standards, then there’s clean code, and I think that the definition is almost somewhat subjective.
With the open source nature of WordPress, the desire to improve education around the platform, the desire to improve the plugins repository, and the existence of things such as Theme Review team, Theme Unit Test, and tools specifically for helping us write code, there’s an innate desire for programmers to write clean code – I just think that we could do a better job defining it.
To be clear, I don’t believe that clean code is synonymous with quality code, nor do I believe that clean code is synonymous with good code. They’re absolutely all related, but they aren’t the same thing.
With said, what does constitute clean code specifically in the context of WordPress development?
Continue reading