WordPress’s Code Isn’t Perfect; Learn It Anyway

WordPress is not the best-programmed system in the world. And anyone who would dispute that is silly.

WordPress has a bit of a reputation. People will call it spaghetti code. They’ll call it a gross mess. They’ll tell you that it hasn’t changed since 2005, and is written in a prototypical PHP 4 style. If they’re nice, they’ll tell you it’s procedural code with some objects mixed in.

These critiques are reasonable but not correct. WordPress is not the best-programmed system in the world. And anyone who would dispute that is silly.

But—this is really important—WordPress is a much better system than critics allege. It has made intentional trade-offs in a different direction than most other software projects in the world. These lead to most of the great things that differentiate WordPress from competitors in the crowded CMS market. But they leave behind rough edges that you’ll have to get used to if you’re going to make WordPress either a member of your toolbelt or your primary tool. For that reason its limitations are worth understanding in a bit more detail and with a little more sympathy.

We’ll cover the reason that most of the derided parts of WordPress are there. We’ll also talk about how you can learn to work within the system, and how it’s sometimes better than the alternatives.

Interested in learning WordPress development? Then check out Up and Running, where we’re offering a free course on the five key principles of WordPress development. Get started on the mini-course today!

Backward Compatibility is Great

You must appreciate that WordPress values broad compatibility over almost everything else.

If you want to understand either WordPress’s success or its rough edges, you must appreciate that WordPress values broad compatibility over almost everything else. WordPress has a long history of asking, first and foremost, “how can we keep people’s experience using our software as smooth as possible?” The exception to that being the guiding principle are mostly far in the past, and remarkable for how different they are than most of WordPress’s choices.

In my use of it, WordPress has had two memorable changes to the way the back-end interface looks and works. The most recent was “MP6” and it was publicly honed for months and months as a plugin that many users in the community had used before it became the official interface to the WordPress dashboard in 2013.

The other was five years before, when WordPress announced a “Crazyhorse” interface overhaul. When that landed in 2008, the community was a little surprised and alarmed. The design flowed out from a small panel of experts, and a lot of people didn’t initially like it. MP6 was built differently as a result.

The lesson here is that most changes in WordPress happen slowly.

The community has learned, from past mistakes, that stability is better than rapid disruptive iteration. I’ve said before that WordPress’s conservatism is the “best worst thing”. And I still firmly believe that. It’s the thing that keeps plugins and themes working for years, but it’s also the reason that WordPress is yucky sometimes.

Backward Compatibility Requires Conservatism

What’s nice to do from a code-authorship perspective is often bad and disappointing for end-users of deployed software.

The thing about conservatism is that it means that you’re slow to accept changes that will “rock the boat.” WordPress has this problem. The things that have been questionable design decisions in the code since the beginning are still there. And are likely to be for some time. This is the burden that one must balance in any technical project. What’s nice to do from a code-authorship perspective is often bad and disappointing for end-users of deployed software.

Not every project has made the transition from Drupal 6 to Drual 7 or 8. But almost every WordPress site on almost any version can be up-to-date in a small number of hours. Many would need only the simple update procedure of extracting the newest zip over the old install. (And that procedure would only be necessary on versions from before dashboard-updates became possible.) And that’s no small accomplishment. Though I’d still discourage a live update to your production site in quite that way.

But you can’t get both that superpower and a beautifully modern system. Some projects do it better than others — I love the way Symfony makes these compromises — but WordPress’s is not all wrong. The conservatism of WordPress is a little more extreme than Symfony’s, but it’s hardly the wrong way to make these choices and compromises.

Learning WordPress is an Exercise in Humility and Acceptance

Learning WordPress development does not teach you the best way to solve all the problems that WordPress solves. It’s going to teach you the way WordPress has solved its problems. And how you can work within the constraints WordPress has imposed. You’ll also learn how to make personalized accommodations for the things you find completely intolerable.

A long-deployed WordPress site is the ultimate brown-field venue for learning. It’s not a nice greenfield in which you can build your own dream house (and later learn why many of your choices were bad). But it’ll teach you patience and humility for the process and what WordPress does manage to do despite its limitations.

This is a valuable thing on its own. It’s absolutely indisputable that WordPress is not the best software system around. No WordPress core developer I’ve ever talked to or heard talk about the topic believes that. But they (and you) work on it for other, bigger reasons. Reasons about how common, how elegant for end-users, and how pragmatic the whole thing is.

Learn WordPress Development Because WordPress is an Amazing Tool for Publishers

You’ll never get a lot of prestige and love from the software community at large for being a WordPress developer. But peer regard—either positive or negative—isn’t a good reason to do or not do anything.

The reason to learn WordPress isn’t to learn in a system where the idealized version of the SOLID principles are applied. WordPress isn’t that. It’s a pragmatic system with lots of design compromises for either history or compatibility. You’ll never get a lot of prestige and love from the software community at large for being a WordPress developer.

But peer regard—either positive or negative—isn’t a good reason to do or not do anything. In software and in life. The reason to learn WordPress is that you believe in the mission of providing normal end users with great experiences publishing on the web. You believe they shouldn’t be blocked by having to surmount silly technical barrier like understanding HTML and getting into the intricacies of a markup-less text system like Markdown. (Don’t get me wrong, I love Markdown. But lots of people who don’t code fear it.)

In learning WordPress development you’re consenting to pilot a not-amazing technical system because it empowers people better than any alternative. People can learn to use Symfony CMF, or Jekyll. But if they want and need WordPress, they’d rather have WordPress. And giving people a tool as powerful as WordPress is a good choice. Always.

You Can Help Make it Better

The great thing about WordPress is that it’s open source and committed to that. It doesn’t improve the pace of change, but it does mean that people who put in the time can change their (least) favorite feature to make it work in the just the way they want.

Someone new to WordPress isn’t going to make a huge contribution in the first few months of using WordPress as a developer. If you’ve never done “programming” before, it could be years before you feel confident enough to make a contribution to the underlying code.

But there are huge contribution you can make without rewriting code. Documenting your learning and struggles with understanding can help people with more learning understand what to change. And there’s always a role for people understanding where they are and helping people get at least that far along.

Learn WordPress Today

Hopefully I’ve taken you some distance on the journey of learning to accept that WordPress’s limitations and trade-offs aren’t all bad. Maybe I’ve even convinced you of the value of trying your hand at WordPress development. If that’s true, I’ve got something that should hold your attention.

The team here at WPShout are putting together a great update to our course Up and Running. It was already a great book plus videos course for people looking to learn the ropes of WordPress development. Now it’s revised, updated, and a more comprehensive way to learn the ropes.

You can get started right now with our free five-day course about the basics of understanding WordPress development. It’ll give you a clear sense of how the whole thing works, and you’ll be well armed to make WordPress bend to your will.


0 Comments
Inline Feedbacks
View all comments