WordPress Plugin Clean Up

Tweet about this on TwitterShare on FacebookShare on Google+Share on LinkedIn

WordPress PluginsOne of the things that makes WordPress so attractive is all the free plugins available for it. I can’t complain when it comes to a price tag of $0.

Recently I decided I should go through my list of plugins to see if I need all of them. I wanted to see if I was really getting enough use out of them to justify keeping them around.

I know when a lot of people first get started with WordPress they tend to go on a plugin hunt and installing spree. I told myself I didn’t want to be one of those people. I try to limit the number I install to 30 or less, and once I hit that number I don’t add anymore unless I can get rid of one first.

Now the thing about plugins is you might install one that uses a lot of cpu, memory, or database resources without realizing it. If that happens to be the case one plugin could be the equivalent to five or ten less resource intense plugins. So it really varies from one to the next.

If you have ever deactivated and deleted one you can check the results by simply clicking a link. Generally what you will see is a list of files and possibly folders that were removed. Pretty simple and strait forward for the most part.

The problem with a lot of WordPress plugins are they don’t do a very good job at cleaning and removing database entries they originally created when they were installed. What I mean by this is when you delete one the database entries remain. For most people this isn’t a big deal, but it does create database waste.

I decided to remove two plugins that I didn’t think were that useful.

The first one was subscribe to comments. That’s the little checkbox that you see on some blogs near the post comment form area. It basically allows someone to receive email notifications when there is a new reply to the particular blog post that they happened to comment on.

Most people would say well that’s a nice idea, and it could potentially encourage more return visits. It’s definitely possible, and I am not saying that you should get rid of it.

The thing I found while using it is some email address either don’t exist, or they were fake email addresses. When that happens the email would bounce and it was never delivered. Why anyone would subscribe if they were using a fake email address is beyond me. To me this was a waste to send out notifications that were just going to bounce anyway.

The second one I removed is called Thank Me Later. Thank Me Later sends “thank you” emails to your commenter’s at a time of your choosing. I originally thought this was another nice idea that might encourage people that had commented to return. The more I thought about it the more I decided that it could be annoying and actually discourage people from coming back.

Since this one does involve sending a notification by email, fake and non-existent email address will also cause messages to bounce and never be delivered just like the subscribe to comments plugin.

I deactivated this one a while ago, but only recently deleted it completely. One thing I noticed with this plugin in particular is it doesn’t remove entries from the database when you delete it.

I have over seven thousand entries stored in my database for this plugin alone. Each and every message that it sent was never removed afterwards. Database entries just keep piling up, which in my opinion is a huge waste.

Thank Me Later Database Waste

I was hoping that when I deleted it all those database entries would be removed, but that didn’t happen.

So now I have the fun Not So Fun job of going through my database and manually removing all the waste it created.

I am not complaining about either of these plugins. They do what they are supposed to do, and they work well. I just got tired of the bouncing email, and the annoying factor that could be associated with them.

I wish the Thank Me Later plugin would have done a better job at cleaning up after itself when I chose to delete it.

I obviously can’t test out every WordPress plugin out there, but I suspect there are quite a few of them that don’t clean up after themselves either.

About: Jeremy LeSarge - AKA: Ray (209 Posts)

I am the site owner and administrator of DialMe.com. I provide help and tips for Boonex Dolphin on the main part of this website where you will also find an assortment of other resources. Here, on the blog I write about a variety of topics surrounding WordPress, technology, social media/networking, SEO, and webmaster resources.


  1. Reply

    Yes I can understand how you are feeling. I hate when something creates a database entry and it is non reversible. I just like to keep my database compact and optimized at all times. If you want to clear that emails out I think you can create a new email address of yours fire the thank you later emails from that email and whichever have bounced back you can just extract emails addresses from that inbox.

    Run a loop through each email and delete it from the table. I know this is headache work but then just in case you want to save some of the emails from the list. Otherwise a simple thing would be to run a query matching the pattern for the rows created by this plugin and just clear it out.

    Keral Patel recently posted..Adding Custom Messages into RSS FeedMy Profile

    • Reply

      I was thinking about dropping the tables highlighted in the screenshot completely. I just need to make sure they are all for this particular plugin before I do that. I am pretty sure that they are, but I should do some double checking first. I don’t think I really need the email addresses because they are stored elsewhere too. I really hoped that they would have been automatically removed when I got rid of the plugin, but unfortunately they weren’t. Thanks for the suggestions.

    • Reply

      Hi Evan,

      There are several plugins out there that will optimize your database. I know there is at least one that you can schedule I would have to do some checking for the link though. I don’t think you really need to optimize your database every hour though. Between once per week to once per month is usually sufficient enough. You could possibly go once per day, but that usually isn’t necessary either. I manually optimize mine with phpMyAdmin from within my hosting control panel.

      • Reply

        Interesting post and I see I am going to have to bookmark this page because you have removed the Subscribe To Comments plugin. Is that Mark Jaquith’s plugin that you are referring to? One of the good ones. Although if you are getting fake email addresses in comments then it must be painful. What happens with the bounce? Does it damage reputation anywhere?

        I would appreciate some tips or pointers on how you go about manually optimizing your database. I have dropped a few tables when I see something that is not part of the core and which I see is part of a plugin I no longer use – but I am not very techie and I don’t know my way around database logic, so my heart is in my mouth when I drop a table.

        • Reply

          Hi David,

          I don’t recall exactly which subscribe to comments plugin I was using. It was was one of the popular ones that a lot of others seemed to be using though.

          Some email addresses that I got weren’t the most obvious. They appeared to be what someone would really use for an address. Others were a little iffy. What would happen is a lot of the messages the subscribe to comments and the thank me later plugin would send out was being returned to my email. I don’t see this as a reputation problem, but it cluttered my email and is sort of a waste of resources.

          I used to see people mention WordPress database clean up plugins, but the ones I checked haven’t been updated in a long time and they seemed a little on the confusing side. It is also possible that you could do more harm than good and end up breaking your site with these.

          Dropping tables can be risky if you are not totally sure about them. I have dropped entries within a table itself, but rarely an entire table. You definitely want to download a database backup before doing anything like this. If you mess up or break something that way you can restore the backup.

  2. Reply

    I learned a few months ago Ray that when you delete a plug-in it’s not necessarily deleted from your database and I had a similar issue although it wasn’t just one plug-in. It was all the plug-ins that I’ve used and/or tried over the years that I never knew were not completely deleted from my database. What a royal pain in the you know what that was so I definitely sympathize with you regarding this issue. I haven’t deleted every single one of them but for the most part I got rid of a lot. It freed up my database usage so now I know to check when I do that again.

    Good luck!

    Adrienne recently posted..The Death of TweetDeck v0.38.2My Profile

    • Reply

      I don’t install too many plugins. I try to limit them, and install only what I really think I need. Occasionally I decide like in this case that I really don’t need a couple of them.

      I guess I assumed that if I deactivated it then the database entries would remain, but if I deleted it completely they would be removed. I have come to the conclusion that I should expect the unexpected, or at least I shouldn’t take it for granted. Oh well one more thing to add to my ever growing things to do list.

      If someone deleted a plugin by accident and said whoops I didn’t mean to do that it might be helpful for recovering from a situation like that. They would most likely be able to get everything back since it wasn’t deleted from the database.

      I use another CMS script and when I delete something everything associated with it is removed from the database, which is great. I do hear people say that they accidentally deleted something and lost everything though too.

      It can be a no win scenario sometimes.

      I would imagine with all the plugins out there some people probably have a lot more database clutter and waste then they realize.

  3. Reply

    Hello. I’m the developer for Thank Me Later. If you were using version 3.0 or above, the plugin should have deleted it’s database tables when you deleted the plugin. If it didn’t, then this is obviously a bug that needs to be fixed — I will look into it. If you weren’t using 3.0, you can upgrade to the latest version, then delete the plugin. This will delete data from previous versions, too.

    If you are feeling ambitious enough to do a manual clean up, it’s safe to remove the following tables:

    * wp_bbpp_thankmelater_messages
    * wp_bbpp_thankmelater_schedules
    * wp_thankmelater_sent
    * wp_thankmelater

    And you can remove the following options from wp_options:

    * bbpp_thankmelater_version
    * bbpp_thankmelater_last_legacy_tick
    * bbpp_thankmelater_last_control_tick
    * bbpp_thankmelater_preview_post_id
    * bbpp_thankmelater_preview_comment_id
    * _tml_options
    * _tml_nextUpdate
    * _tml_installed
    * _tml_promote

    If there’s any problems, feel free to post on the WordPress support forums: http://wordpress.org/support/plugin/thank-me-later


    • Reply

      Hello Brendon,

      I am not sure which Thank Me Later version I had when I delete it. I can’t check the version because it’s gone now. I know I have had it for a while. A few months ago I deactivated it and just left it that way until I was sure that I wanted to delete it.

      I don’t know if it checks for updates while in deactivated status or not. If it does and there was one I would have kept it updated.

      A couple of days ago I decided to delete it completely from within the WordPress dashboard. It did give me a list of the files/folders that were deleted, but the following still remain in the database. I am guessing the _tml prefix is Thank Me Later.

      The tables pictured in this blog post screenshot and still remain are (some with a lot of entries):

      After searching the database for _tml I find the following in wp_options:

      There could be others in the database I only checked the main table entries, and the wp_options for _tml.

      It would be great to automatically remove everything rather than go through the database and do it manually because I might miss some entries.

    • Reply

      Hi Servando,

      I don’t see it causing or leading to any speed issues by leaving it the way it is. I am not in a real big hurry to remove the database entries because I know it will probably take some time to go through it. I was thinking I probably should soon though because if I wait too long I’ll probably forget what I needed to do. But, the entries are really not causing any technical issues. I’ll probably wait until I am really bored one day and have nothing better to do.

  4. Reply

    This is something I haven’t thought about. I try to limit my plugins to a maximum of 15. But when I delete some plugin I assumes the database entries are also removed by default. Guess I need to do some manual checking.
    Nishadha recently posted..SWOT analysis diagramsMy Profile

Leave Comment

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

CommentLuv badge