Freigeben über


Evaluating jQuery Plugins for Use in your Projects

I just found, what looks like an, awesome HTML5 Uploader jQuery Plugin in my Twitter feed and my first thought was, “Wow, this would make a great addition to the project that I am currently working on.” Unfortunately, once I started to evaluate the plugin it failed miserably in all aspects of my evaluation criteria. So much so, I feel it is a great example of how NOT to release a jQuery plugin.

Here is the criteria I use to evaluate a jQuery plugin before I consider using it in my project:

  1. Good documentation and demos - If I can’t figure out how to use your plugin and/or see what it’s capable of fairly quickly I don’t really want to waste my time on trying to figure that out. The plugin author should be providing at the very least easy examples on what the plugin does.
  2. Easily downloadable - Seems like a silly requirement but if I can’t easily download the code because of a silly wall in place like having to tweet to be able to get to the code base then that’ll weigh heavily in my determining to use the plugin or not.
  3. License released under - I should also be able to find what license the plugin is released under. Ideally it should be listed on the plugin site but if not in the header of the JavaScript file. If a jQuery plugin does not have a license specified I will not consider it.
  4. Source code available - Most jQuery plugins are released with an open source license, with those projects the code should be available to evaluate. I should be able to see the full source code, if you are only providing a minimized version then I am unable to evaluate very easily to understand how the code is architected.

These are just simple things every plugin author should be doing. Unfortunately, HTML5 Uploader jQuery Plugin failed on 3 out of 4 items listed above. I contacted the owners of the plugin to voice my displeasure and was sent a reply with a code beautifier link to be able to read the minified code that one got after having to “Pay with a Tweet” to download the code which has no license attributed with it. I replied back with “thanks, but no thanks” and will find something else until they fix those issues above.

In addition to the items above, I consider the following to be a huge plus when evaluating a jQuery Plugin:

  1. Source Code available on Github - This is a huge plus I can easily fork, watch or submit issues to the code base. Github also provides the easiest way to view commits and see if the code has been idle or not.
  2. MIT and GPLv2 Licensed - I find plugins licensed the same as the jQuery code base to be ideal.
  3. Unit tests - It shows that the code is thoroughly tested each release and I can rest assured that the code is of quality.
  4. Issue Tracker - If it is on Github I can see if the issue tracker is in use and if issues are being addressed as they come up. This allows me to help the project if I come across any problems.

What are some criteria you use when evaluating jQuery Plugins or JavaScript code in general?

* Note: This content was originally posted on https://ralphwhitbeck.com and is reprinted here with permission.

Comments

  • Anonymous
    July 10, 2011
    I believe that you did tweet about their jquery pluggin the morning.  Where is your source code?

  • Anonymous
    July 10, 2011
    I couldn't agree more. Very simple requirements/requests. I would be great if many more jQuery developers felt this way.,