Plug-in Development: How far should support go?

Website building

Last saturday I went Karting and Laser Tagging with friends, which resulted in me being pretty sore on sunday. A good reason to have a quiet day to work on the new features of the Daily Dilbert plug-in.

I wanted to tackle a few things before I would sink my teeth into the strip importing bit, which will take me a little while.

My conflict today was pretty much between my coding standards/style versus the community I serve.

The first part of the conflict started when WordPress released their new Widget framework in version 2.8. This framework allows for a much cleaner way to develop widgets and basically allows for multiple instances of the widget without the extra fuss you had before.

I posted earlier that I would incorporate this new framework into the Dilbert Widget. However as I was working on bits of it I realized that doing this I would also deny people with WordPress versions older than 2.8 the opportunity to use the plug-in. As such I decided to add the new features first, do a release and then upgrade the widget to the new framework.

The second issue came to light when I started putting together the code for the plug-in. To organize the plug-in I put all the functions in to a class.

I am an avid believer of the object oriented programming approach and this means that if you are programming in PHP you tend to prefer PHP5 over PHP4, since PHP5 has a more mature class implementation.

This does however imply that my plug-in would only work if people host their WordPress installations on PHP5. Since there are quite a few folks hosting on a PHP4 setup, this would completely exclude them. The only way to achieve this, is to downgrade (read: deface) my code in order to make it PHP4 compliant.

The question formed in my head: how do you choose between a wide support and code neatness? Trying to find numbers there’s no way of knowing exactly how much people still run on PHP4 setups. After it’s debute in 2005 you would think most systems have switched over, but there are still plenty servers out there with PHP4 support only.

It does feel a bit like the dilemma which many musicians face: do I stick to my musical roots or do I shift towards the masses. Granted, the comparison is piss-poor but you know what I am getting at; I take pride in what I create and I don’t like making concessions in quality to make it more widely available. If given the choice I am sure an architect would prefer to work with metal, cement and brick, rather than straw, mud and shit.

There is a third option to consider: branching the code and create 2 separate versions of the plug-in. This way folks who are stuck with PHP4 can still enjoy the new features. It will just mean more work for me. Also, the WordPress plug-in doesn’t support multiple branches of the same project (at least to my knowledge), so I’d have to offer it separately and it won’t be subject to the automated updates.

I think for now I will choose to go for the PHP5 approach. I want to have the new options available soon. After a successful release of the PHP5 version, I will consider branching the code and make a PHP4 compatible version which I will host here.
Either way, the new widget API will be implemented after the next release.

To be continued…

2 thoughts on “Plug-in Development: How far should support go?”

  1. Hi !

    I just updated wordpress to 2.8 yesterday. And somehow your plugin messed up the sidebar, hiding everything buy the dilbert stuff.

    I spent two days searching for the reason of the problem, that I first thought it was an issue on the Categories part. Then I started turning each plugin off, and realized that the black sheep is the Dilbert one. Somehow it’s hidding everything on the sidebar to show itself. I wonder if you can help me figure it out why !!!

    Thanks !


  2. Hello Luciana,

    Thanks for contacting me.

    I am sorry to hear you have had a bad experience with the plug-in. I test the plug-in against the default WordPress themes as well as my own, but it’s impossible to test it against all themes.

    If you will send me a link to your blog where it goes wrong perhaps I can try and help you find out what is wrong.

    Kind regards,


Comments are closed.