“Clean up WordPress” is a phrase that those of us involved in WordPress hear a lot. It’s misleading though because if you’re a developer, it might mean one thing. If you’re a user, then it likely means another thing.

But without any more context, you can still ask: Clean up WordPress? In what way?

  • Does it mean the database?
  • Does it mean part of the file system?
  • Does it mean something in a theme or all of themes?
  • Does it mean various plugins or part of a plugin?

And so on. You see what I’m saying, though? It’s a particular point of discussion, but your experience may vary depending on how you use WordPress.

Though I try not to talk about content from other blogs on my blog, sometimes an article and/or a comment brings up a point that strikes a chord with me. So I feel inclined to do so.

Clean Up WordPress

As mentioned earlier, this is going to mean different things to different people, but WP Tavern recently ran an article about a plugin that aims to clean up WordPress by targeting the mess left by other plugins.

Clean up WordPress

As if it isn’t meta enough for this blog to talk about another blog, we’re talking about a plugin that works with something regarding other plugins.

No Negativity Here

And before I go any further, no:

  • This post will not disparage WP Tavern’s content.
  • This post will have nothing negative to say about WP Tavern.
  • This post doesn’t even have anything to do with WP Tavern.

For what it’s worth, I respect and enjoy reading the blog. Jeff, Sarah, and Marcus do an excellent job running it. I think it’s one all people in WordPress should be reading.

Okay, Back To It

If you’ve not already read it, here’s the gist of the article: It covers a plugin called WP Asset Cleanup.

To be clear, I’ve not used the plugin nor do I plan to do so. But the point of what I’m getting at has nothing to do with a review of the plugin, so bear with me and read on.

The gist of the plugin is as follows:

There are often times when you are using a theme and a number of plugins which are enabled and run on the same page. However, you don’t need to use all of them and to improve the speed of your website and make the HTML source code cleaner (convenient for debugging purposes), it’s better to prevent those styles and scripts from loading.

It sounds like a pretty slick idea, doesn’t it?

I mean, it’s a plugin to improve the performance of your site by examining what other plugins are doing and stops them from doing things that will damage performance.

But wait. Shouldn’t this “clean up WordPress” idea be a call to action to WordPress plugin developers?

A Call To Action

Here’s how I see it:

If I was writing WordPress plugins and wanting to make sure that I was writing the most optimized code possible, wouldn’t that be my responsibility?

The fact that we’ve reached a point where we rely on other plugins to clean up our messes is embarrassing.

This has nothing to do with the plugin author. The plugin itself is aiming to fix something that is a problem in our economy, and that’s great.

But if a plugin developer cannot conditionally add dependencies using the native WordPress API let alone properly use minification tools, it seems like there’s a larger problem that exists.

And there does.

On a More Personal Note

This is to chastize no one. I’ll be the first to admit that I’ve been there before, and if you look at some of the plugins that I have available, you’ll likely find places where I’ve not done a great job at optimization.

But if you look at more of my later work, especially that which I’ve been doing for Pressware, you’ll see a far greater improvement in what I’ve written. That’s the goal, at least.

Furthermore, I’m looking to do more with this later this year. More on that later, though.

For clarity’s sake, I’m not on a soapbox. I’m with everyone else.

What Are We To Do?

I’ve reached a point with my experience in WordPress to accept the fact that there is and always will be poorly developed products.

I’ve also reached a point where I know that there will be high-quality products some of which are free, some of which are not. I’m completely fine with both and I love donating and/or purchasing the software written of this caliber.

But until other people:

  • are shown the problems with what they are doing,
  • shown solutions for what they are doing,
  • and genuinely care about what they are building,

Then the problem is not going to go away, and someone is going to be left having to clean up WordPress.

So as you work to continue moving your development skills forward and aim to become the best developer possible, ask questions about some of the very issues above.

The developer community is happy to help (most of us are, anyway), and we want to see this economy thrive with people who are smart and get things done the right way.

Category:
Articles
Tags:

Join the conversation! 4 Comments

  1. Great article!

    As a developer, I see “Clean Up WordPress” as modernizing up WordPress Core, removing the bloat from core, and enforcing modern design standards for plugins and themes.

    Core should be brought up to modern standards with a OOP MVC design model, and YES you can update the code and keep backwards compatibility. In fact using a OOP MVC model it would be very simple. Updating to this model will also eliminate and help remove bug, because the code will be in smaller chunks. Making it easier to work with and reuse repetitive snippets.

    Removing the bloat will also improve WordPress for everyone. It seems like every update more and more bloat is added to core. I’m all for innovation like the WP-API and UI improvements, but things like emojis, the customizer, and distraction free writing can be better served as plugins. Allowing developers and user choose what features they want added. Instead of forcing them on everyone. I’d also love to see a fork of WordPress where it’s stripped down to just the bare minimum needed to run a CMS. This would allow developers to build the most efficient CMS they can.

    I love the fact that there are so many great developers building themes and plugins for the masses to use, but there is a lot of bad practices going on. The WordPress repo should be setting and enforcing better code standards. No more spaghetti code, OOP, namespacing, etc. Even the biggest plugins and themes are guilty of sloppy code. WordPress has always had a low barrier of entry for developers, which is great, but there’s not a lot information out there for steeping up your quality. The major sources for tutorials are still promoting spaghetti code with Tom being one of the exceptions.

    • Great article!

      Thanks Jason!

      As a developer, I see “Clean Up WordPress” as modernizing up WordPress Core, removing the bloat from core, and enforcing modern design standards for plugins and themes.

      I generally agree, though when I hear “removing bloat,” I tend to think of this is something that’s already happening but it’s happening over time.

      First, I think we’d have to identify what the bloat is. Right now, the backwards compatibility could be considered bloat, but it’s necessary, you know? So it can’t be removed until a significant amount of time has passed.

      Secondly, things are being deprecated, which is good, but it takes time to fully get something out of the system that’s used so widely across the Internet.

      Finally, as far as plugins and themes are concerned, I completely agree; however, that comes with assuming the people building these things are familiar with the proper techniques and development practices to do so. And many aren’t.

      I’m not saying that they should be (that’s neither here nor there for the purposes of this comment or post), but I think it’d go a long way in preventing certain conflicts that we see with some of the plugins in the repository.

      Core should be brought up to modern standards with a OOP MVC design model, and YES you can update the code and keep backwards compatibility.

      Definitely – as far as compatibility is concerned, using things like a Facade or whatever to facilitate the communication of objects during the refactoring would work.

      In terms of MVC, I’m not sold that it’s the best way to go. It’s popular right now, but even in the last 5 years, variations on that pattern have become more and more prominent. Personally, I don’t have that big of a problem with the hook system.

      I do however prefer smaller classes, more single-purpose functions, and more cohesive code. Right now, we’re at a place where a lot of people are throwing functions into a god-class and then calling it “OOP” which we both know isn’t really OOP :).

      But in terms of MVC? :shrugs: I like it, to be sure, but I dunno if it’s necessary to refactor all of core. I’m not sold that it’s the silver-bullet design pattern many have made it out to be over the last half-decade or so.

      I’m all for innovation like the WP-API and UI improvements, but things like emojis, the customizer, and distraction free writing can be better served as plugins. Allowing developers and user choose what features they want added.

      This is a really neat idea. It’s funny now that you bring it up because so much of it starts off as feature plugins before they get merged. Granted, the emoji plugin was basically a way to handle a security problem in WordPress, but they got a “neat feature” into core.

      For some, I understand why emojis are necessary; for others, not so much. But the idea of putting together a CMS out of plugins is a neat idea.

      I love the fact that there are so many great developers building themes and plugins for the masses to use, but there is a lot of bad practices going on.

      Agreed on both points.

      WordPress has always had a low barrier of entry for developers, which is great, but there’s not a lot information out there for steeping up your quality.

      Agreed. But why do that when it’s so easy to copy and paste? :(

      The major sources for tutorials are still promoting spaghetti code with Tom being one of the exceptions.

      Thanks so much. I do appreciate it. I try to share stuff that’s well designed, but I make mistakes — that’s why I’m glad to have people (like you!) to offer feedback in the comments.

  2. I’ve been developing WordPress sites for over 7 years. But I’m not loving it anymore. It really is a mess. The code. The dashboard. The options table. The mountains of ugly PHP embedded in all template files. Themes with 1,000 shortcodes (something that shouldn’t exist at all because it’s a horrendous workaround for WordPress’ limitations that’s been brutally abused). Themes with a million confusing widgets and meta boxes. All of it is a bloated mess because no one is using it to do the one thing it was designed to do well… simple posts and pages with a fixed content model that allows for theme-ability (even though no one ever changes their theme of if they do the entire site breaks). These days I find the best way to clean up WordPress is to ditch it completely and use Craft CMS. Such a breath of fresh air.

    • I think there’s a distinction to be made among some of the points you’ve made. That is to say that they aren’t valid (some of them very much are!), but there’s a line that needs to be drawn between WordPress itself and things built on top of WordPress.

      It really is a mess. The code. The dashboard. The options table.

      I’ve mixed feelings about the code, but because I understand it’s position as a partial legacy application with a strong focus on backwards compatibility, it’s okay.

      • There are a growing percentage of unit test coverage and things to improve over time, so I’m not particularly upset with core code.
      • The dashboard does have a lot going on. I was just talking with someone this weekend at WordCamp Atlanta about how, when you’re used to WordPress, and you move along with it, it’s easy to get used to where things are and what to expect. But you become to blind to what you don’t already know. If you’re someone who used WordPress versions ago. Say, like, 3.5 or 3.8 or something and then you looked at 4.4, you’d get a it of sticker shock because so much has changed. Granted, a lot of it is a fresh coat of paint, but some things have been removed (like Links) and some things have been added.
      • The options table hasn’t really changed much in terms of how it works and what it’s purpose is. Depending on what has written to it (plugins, themes, etc.) and how responsible they are about cleaning up after themselves (or irresponsible), then it can make for a bit of a headache.

      Themes with 1,000 shortcodes (something that shouldn’t exist at all because it’s a horrendous workaround for WordPress’ limitations that’s been brutally abused). Themes with a million confusing widgets and meta boxes.

      I don’t disagree with you at all here. But I think this is one important thing to note — this isn’t WordPress. This is what theme developers have done.

      I have a very strong stance on themes being specifically for presentation. There should not be a lot of options, there not should be a lot of addition features, and there shouldn’t be a lot of widgets or meta boxes that come along with it.

      A theme is presentation. But it’s been abused. That’s part of what comes with the nature of the territory.

      And shortcodes? I’m no fan. I’ve written about them before (and likely will again). It’s basically a high-level markup language for people which sucks because people who want to write shouldn’t have to learn about that kind of stuff.

      All of it is a bloated mess because no one is using it to do the one thing it was designed to do well… simple posts and pages with a fixed content model that allows for theme-ability (even though no one ever changes their theme of if they do the entire site breaks).

      I don’t mind the evolution WordPress has taken from a blog platform to something that can be used as a sort of application foundation (another thing I’ve written about a lot and even used in client projects).

      But if a person is going to be using it strictly for blogging, I think there should be a stripping away of certain things in the dashboard (hence user roles and capabilities, etc.) to help curtail this.

      These days I find the best way to clean up WordPress is to ditch it completely and use Craft CMS. Such a breath of fresh air.

      For basic CMS functionality, for sure! Why not? I welcome new players to the market and I’m all for it. It reduces to depending on what your needs, what your client’s needs, and/or what your user’s needs are.

      That’s not meant to be overly simplistic nor dismissive (and hopefully my comment shows that), but it’s meant to also present it in a way that we aren’t throwing the proverbial baby out with the bathwater.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.