1

As web developers obviously we don't want to reinvent the wheel with everything we do so best practice would dictate when necessary we should use third party scripts and plugins.

Recently I have found a slew of 'bad' plugins for Wordpress, which fall into two categories;

  1. The plugin works fine, but isn't written using current standards.
  2. The plugin appears to work but is just written wrong.

Both plugins do what they say they will do, but in the first category you can't minify the javascript behind them because the javascript hasn't been written to conform to say jslint or any other code validation and in the second category the plugin uses potentially insecure code or incredibly inefficient code so under normal use it seems fine but under pressure seams become undone and the server gets hit with unnecessary loads.

The thing I can (and will) do is rate the plugin and provide feedback, but lets say 10000 people have downloaded the plugin and never need to minify it, or need to put it under pressure, my one negative review will be a drop in the ocean. It feels like more should be done.

What else should I do as a developer and we do as an industry to ensure sloppy third party plugins get brought up to speed?

2 Answers 2

3

Fix it !

If you have the ability and the need to fix it, share the fixes with the world. or if someone else is making money off a really badly written plugin (and thus probably will make money off your fixes if you were to tell them), write a replacement, write something better. other than that there isn't much you can do about it, except for telling the developers or writing a blog post about it.

3
  • Before going public with any fixes, defiantly pay attention to the license of any code because even if the code is open, the developer might not permit distributions of modified versions.
    – theonlylos
    Commented Aug 1, 2011 at 3:58
  • 1
    Normally I would agree 100% but what I don't like about that is first of all most plugins I have dealt with are not collaborative projects, so not only is there no framework in place for submitting patches/fixes there is also nothing to stop the owner from just saying it was all their own work (not saying they would, but there is nothing to stop them). Doing this will make the pool of code better but will it make that developer any better? Will they just write another plugin making the same mistakes again after?
    – Toby
    Commented Aug 1, 2011 at 6:25
  • 2
    unfortunately that is the problem. I would also assume that a plugin gets written because the creator needs it and writes it for himself, not caring too much about maintainability or how new functions could be added. Then releasing it because he feels other people may need it as well. He might not even be qualified to write something like it in the first place. You may not get any credit for submitting bugfixes even if you basically rewrite the whole thing. but i still think it would be better to fix it and make it better than to try and put blame on creators of plugins for what they do.
    – xyious
    Commented Aug 1, 2011 at 6:41
0

in the first category you can't minify the javascript behind them because the javascript hasn't been written to conform to say jslint or any other code validation

It doesn't matter if the code doesn't follow any "validation standard", you can still minify it just fine. Check out Closure Compiler, probably the best one around.

I would suggest avoiding the second one if there is a good chance it's insecure or inefficient. Your issues with the first one are likely easily fixed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.