September 17, 2020
Really Bad Programming
September 17, 2020
The new slideshow
A while ago, I took a look at the database tables, and realized that about half of the database was due to the slideshow plugin MetaSlider. MetaSlider crapped out thousands of entries across multiple tables. What bothers me is not so much the waste of storage space as the incredible inefficiency of having to retrieve all of that bit by bit from the database server. I did my best to minimize that kind of inefficiency, while the writers of MetaSlider did the opposite. In computer programming, more is almost never better.
MetaSlider crapped around 10,000 entries in the posts table alone. That is absolutely insane, and totally irresponsible. Just to make little slideshows. That is the worst programming I have ever seen.
So I decided that MetaSlider had to go, but it was going to be a big job that I didn't want to start. MetaSlider is just a wrapper for Nivo Slider, which actually does all the rendering. I have to wonder why MetaSlider has to make such a mess when it is not even doing the real work. So I got the Nivo Slider plugin, and started replacing slideshows one by one. Nivo Slider actually has a better interface than MetaSlider, which is a bloated mess, those guys didn't miss a trick. The one thing Nivo Slider can't do is copy an existing slideshow as the basis for a new one. But a simple little plugin called Duplicate Page takes care of that, it will duplicate any kind of post, including Nivo Slider slideshows.
Now I just need to grind out the replacement slideshows. I've done the big ones and deleted the MetaSlider versions, and the database size has dropped noticeably. While MetaSlider drops garbage all over the place, I have yet to find where Nivo Slider even stores its data.
So why am I ranting about this? It's just another example of how bad programming can be. The MetaSlider team obviously thinks they are creating the Taj Mahal, when in fact they have created Fresh Kills. Also, it is another example of why you need to be very leery of WordPress plugins. A lot of the ones I've looked at are really badly written. MetaSlider has to be one of the worst - what were they thinking? That's not to say that I haven't seen some plugins that are amazing too.
I also re-wrote my handlers for WordPress Tags and Categories. Now that is all much simpler and more integrated, with new features to boot. Finally, I added some basic automatic database maintenance, although for the heavy lifting I still resort to plugins.
Update:
Once I get into a groove, I can make the small slideshows faster than I thought. One reason is that I have the normally pokey WordPress media gallery running much faster than it would want to. More bad programming. I should have all the MetaSlider crap out in a day. The database has already shrunk considerably, when I'm done it will be about half the size it was. How can anyone write such bad software? I should have cleaned-up this mess ages ago.
Update:
All done. The hardest part was sorting out all those sunburst Strats in thumbnails. The best part was deleting MetaSlider forever. I also noticed that MetaSlider crapped all over the Custom Field list. There was just no corner of WordPress left un-assailed. The worst plugin of all time. GOOD RIDDANCE.
Now I need to quit messing around on the computer and go make some sawdust.