A Healthier Option Helps WordPress Users Improve the Options Table

You may have noticed we’ve been covering a lot of plugins lately. What can we say? We’re doin’ work! We have yet another amazing plugin that we’d like you to meet, called A Healthier Option. A Healthier Option analyzes your options table and offers suggestions on how to make it healthier.

Autoloading WordPress options

WordPress provides a way to autoload (or not) certain options. WordPress stores these autoloaded options in a big bucket, like an object cache that allows a user to say, “This is an option that needs to be available all the time.” To make it constantly available, the option is placed in the autoload bucket, making it easy for the user to access it without having to go to the database. The option is stored in memory and far less computationally expensive.

For a fantastic rundown on understanding alloptions in WordPress, take a peek at this article from our friend, John James Jacoby.

The problem

By default, most object cache buckets can be up to 1 MB. When it’s filled with a reasonable amount of data, that’s totally fine. However, when you’re talking about a lot of plugins with a ton of autoloaded options, the autoloaded options cache bucket can fill up real quick. Once it’s overfilled, it stops working properly.

WordPress attempts to make all autoloaded options available on every page load. This is great, in theory, as it should save a lot of trips to the database. When the cache bucket for autoloaded options is too big, this breaks, and can cause a significant performance drain on your website.

If you have 10,000 options with big values, and 5,000 of those are autoloaded, then it can quickly become a performance strain. Suddenly, your options table gets unwieldy.

Depending on the configuration of your server, your database, and your object cache, what WordPress intended to be a simple and relatively small table of options can turn into the culprit behind your site’s slow speed. We know that loading time can make a huge difference in terms of sales and success, so keeping your site quick should be a high priority. A Healthier Option plugin helps you do that, and makes it wicked easy to manage.

What A Healthier Option does

A Healthier Option provides a health matrix for your options table. It measures a lot of technical stats about your table, makes recommendations, and gives you a simple way to implement those recommendations.

A side note: As always, you should totally make a backup of your database before doing anything. Ever.

The health matrix allows you to diagnose issues and the table below it helps you treat those issues. In classic Zao fashion, we wanted to make it fun, so each component that is measured is evaluated with an emoji first, followed by a recommendation, and, if necessary, the action required. Sometimes there’s a recommendation without a required action, since it’s not necessarily required immediately. The health of each item is graded on a scale.

A Healthier Option Helps WordPress Users Improve the Options Table

A Healthier Option evaluates and measures different parts of the server environment that can affect the options table, including:

  • The options table size: the bigger it is, the more unwieldy it is
  • The options table engine. There are two MySQL engines, but we recommend the more performant one for best results.
  • The autoload index, which is all about improving site performance

The evaluation of your server environment takes a couple of things into account.

The two main MySQL engines we check for–MyISAM and InnoDb–work very differently. If you have the autoload index running on InnoDb, a much more performant engine, it runs super smoothly. If you have the worse engine, but a good index, that’s bad for your site. A Healthier Option accounts for a different variety of scenarios to optimize your site, enable the right engine, and add the index.

The alloptions cache size tends to be one of the biggest culprits for performance problems. A Healthier Option measures the size of your alloptions cache–how many options are loaded in the alloptions cache bucket and what, if anything, needs to be done about it.

A Healthier Option also checks for the number of transients. If there are a ton, we recommend that someone downloads a transient manager plugin and delete them.

It also gives you the ability to review all of the options in the options table. From there, you can bulk delete, etc. You can also sort by size of the option and autoload, which makes it super easy to get the alloptions cache size down. You can quickly search from largest to smallest and set the autoload to “no” on the largest options.

A Healthier Option WordPress Plugin Screenshots

A Healthier Option also protects all of the WordPress core options. The value of all of your active plugins is an option that WordPress stores, and if someone were to use A Healthier Option to accidentally delete core options, it would be terrible. This plugin checks for WordPress core option, but does not allow for WP core options to be deleted, so sites are protected from that potential disaster.

Why we built this

This plugin was originally developed for Qpractice, with Lisa League’s brilliant suggestions and feedback.

The Qpractice site was having some problems that were hard to debug. Lisa would save an option or a setting for Visual Composer, and then it would disappear, then reappear, then disappear, then reappear…you get the idea. There were inexplicable issues that were, turns out, caused by the alloptions cache bucket being way too big. Things that were expected to be present were not, and it was causing consistent issues.

With the help of this awesome article from 10up and addressing Lisa’s issues, we created this plugin and the health matrix to help better identify and document these kinds of problems.

We’re stoked to provide another awesome plugin to the WordPress community. Let us know if you have any questions. Try it out and tell us what you think!

 

Category:
Plugins
Tags:
, , , , ,

Join the conversation! 3 Comments

  1. Super dope. Thanks for this!

    Reply
  2. Awesome tool. Thanks for building this.

    Reply
  3. […] @tommcfarlin: A Healthier Option Helps #WordPress Users Improve the Options Table zao.is/blog/2017/04/2… via @JS_Zao […]

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *