Update: Love the layout? Send your comments to the forums! If I get many positive responses, I may release the theme for free.
2

Wordpress plugin “uninstalls” woes?

Posted by multippt

Looking up at a great post by Weblog tools collection, I’m pretty sure there is a pretty good reason (or reasons) why plug-in authors do not wish to remove the leftover database stuff installed by Wordpress plugins. Entries created by plug-ins serve as a record of settings used by the plugin. Leaving them there ensures that if the user decides to re-install the plugin they do not have to go “oh shoot, what did I do when I last used this”.

The “issue” of space

Of course, saving a little garbage data does take up space, but does it take up much space? Most plugins store at most 1kB of information, but 1 single post like this can pretty much weigh up to 6kB in weight. Wordpress has considered the versatility and resource-consumption of MySQL before choosing MySQL as the platform where Wordpress is built on, so plugin resource consumption was presumably considered as well.

Of course, it can be a slight problem with having tons of plugins installed - causing a wastage of several kB of space when uninstalling them. But certainly that added kB won’t affect your blog in the long run. After all, you do expect your blog to hit a thousand posts some how or rather right?

The “uninstall” button is not a recommendation yet

The Wordpress documentation encouraged the use of using the Wordpress database to store settings. This is great, but the documentation did not promote the use of removing those settings neither. Perhaps Wordpress documentators should highlight uninstallation as a new recommendation, aside from making the options?

Unpredictability in uninstalling settings

Some plugins rely on settings to do the way it is intended to. However, over-dependence on such settings make removing them quite difficult, especially if the plugins are still activated. While this problem might be fixed by making the plugin rely on default settings in such a situation, some plugin authors find it a hassle to add that check in their plugins, especially if they do not know how to. There is also a probability that if the plug-in author do consider the adding of a little extra code to the plug-in just for uninstalling options, chances are it may even outweigh the amount of data consumed by the settings in the first place!

The plugin activation hook is at times buggy (well “at times”) and may not work where intended, resulting in some plugin authors implementing checks if the options were existant and add them if not. While attaching a de-activating hook to plugins is not that hard, is it wise to remove the options saved when de-activating the plugin? Perhaps you de-activated your plugin which deletes options upon de-activation, only to find that after upgrading your plugin you need to re-configure your options again.

Well, some has attached uninstall buttons in plugins as well, but knowing that there is a probability of “accidentally” clicking on it (and the part where we would habitually click “yes” to any dialog we see), we may end up getting our plug-in settings wiped out.

But since it’s such a nice idea

I guess it’s quite a nice idea, though almost no one has complained about plug-ins eating up much database space. Expect updates to my plug-ins. ;)

Though, I still support the idea that plug-ins need not uninstall the options, as such options may be incredibly useful anytime soon, especially if the user has re-considered using the plug-in again (say a wonderful update to an otherwise dull plug-in).