Yesterday, the following Tweet, copying in myself, appeared on my Timeline.
The image is a quote from the README of one of my plugins. Except it’s being used to make a point – a point I don’t agree with (which I’m guessing the Tweet author wasn’t expecting to be the case).
First, a little history. A few years ago, I noticed that there was an issue with the housekeeping of transients in WordPress. I raised it with the Core team and even proposed a solution, including the required code. However, thanks to ‘due diligence’ by the team, they found out that a number of plugins, including some high profile ones, used transients incorrectly – essentially storing permanent data in them. If my housekeeping was added to WordPress then, overnight, a lot of sites could potentially break. The decision was, therefore, to water down the solution so that there would be no such impact. Instead, I put my proposed code into a plugin, named Transient Cleaner. As yet no one has reported it causing issues for their sites.
Rather than demonstrate ‘what is wrong with WordPress’, I would argue the opposite. The housekeeping issue was not a huge problem and, yet, to have fixed it would have potentially broken an unknown quantity of websites. WordPress does NOT intentionally do this – it protects users. This is the same reason why the decision about Zerif Lite was made – that came down to a decision about removing the plugin from the repository or breaking sites. Although both were not positive outcomes, the former was always going to be the better choice.
Alex, whose Tweet started this off, responded to me when I replied that I disagreed.
To answer those questions… he’s right, it’s the plugin authors that have caused this be, to be clear, it currently doesn’t cause any problems as a result. The change to Core would have to be made for anything to breaks as a result. That puts the responsibility completely down to Core, especially as they’re aware of it as a possible outcome.
However, the second question – are the authors being educated enough – is a good point. As far as I’m aware there was no outcome from this and no authors were contacted to make them change their coding as a result. At the end of the day WordPress is run by volunteers and there is only a finite availability of resource. So, no, this hasn’t been done. Should it be? Definitely. And as anybody can volunteer their services, I’d be asking Alex is this is something he’d like to get involved with.
Right now, I don’t believe there is anything in the coding ‘guidelines’ about this, so that’s where we’d have to start – get it added and then contact plugins who don’t abide. For Zerif Lite, they were forced to make a retrospective change as a result of a rule change, so there should be no reason why the same can’t be applied to plugins as well.
One day we may be able to get the proper housekeeping added to WordPress. Until then, you know which plugin you need 😉