Lesson: Plugin Development - What You Should Know (8 posts)

  1. Lorelle
    Posted 11 years ago #

    This is a different kind of lesson. This is a free-for-all lesson where everyone pitches in.

    The topic: What You Should Know About Developing and Creating a Plugin.

    With the recent announcement of Webblogtoolscollection's WordPress Plugin Contest, there are a lot of people out there chomping at the bit to try to write either their first plugin or their 400th. Either way, there are some things you probably should know when it comes to writing a plugin.

    I thought it'd be fun to let the experts share their wisdom because they've been down this road before.

    To start, here are a few helpful articles on the Codex for those considering writing plugins, for the contest or otherwise:

    General Plugin Documentation and Information
    Writing a Plugin
    The Plugin API or hook
    WordPress Function References
    WordPress Developer Documentation

    Now, what bits of advice do you have for the Plugin writer entering the contest?

  2. Noemi
    Posted 11 years ago #

    just write something usefull for all or write it better then the rest :P

  3. Lorelle
    Posted 11 years ago #

    Okay, but what about writing them? Should there be helpful comments, or just enough to get them started? Is there a specific software, tool, or technique you use to write them that is more helpful than others you've tried in the past?

    What kind of clean up on the code and comments do you do before making a plugin public? How do you test them? Do you run them on different browsers at different resolutions, or are they immune to those influences? What are the things someone should take into consideration when planning, writing and implementing a plugin?

    What about documentation? The contest will be judging the documentation as well as the plugin itself, so what are some recommendations on how the documentation should be written? Should that also be tested? Is there a good place or group of folks to test such information on other than family?

    There is a lot to know about the behind-the-scenes work that goes into writing a plugin, and anything you can add that helps people understand more about the process might help people like me, overcome our fear of treading into these coded waters.

  4. Noemi
    Posted 11 years ago #

    I think a good plugin should consist of a couple of things:

    First of all offcourse a damn good README.txt for simple people to use the script. Try to avoid the fact that people have to hack into the WP source

    Commented info lines in the PHP source what does what and what goes where, so PHP knowledged people can edit the PHPsource (in my opinion all plugins should be open source)

    Do NOT add configuration options in the PHP Source but provide an, editable, config file (this also helps upgrades)

    Offcourse the plugin should work on multiple platforms and browsers. MSYQL 3 and PHP3 support would be nice, PHP4 though has some nice new features in them :) :)

    Besides all, one thing I personally live by, is that the author of a plugin should always help out people that can not use the plugin

  5. It should also be easy to find and clearly labelled/named. Sometimes I see a title and even read the description and I'm still not sure what it does or if I need it. :)

  6. Lorelle
    Posted 11 years ago #

    Amen to that, andrea_r. This is one of my big whines.

    So it's important that it work on multiple platforms and browsers, and on current and maybe most recent last version of MySQL and PHP, but what about servers? I have run into big problems trying to get permalinks to work with the version of Apache that my host is running, so wouldn't this issue maybe effect some plugins?

  7. Noemi
    Posted 11 years ago #

    Thats a hard ball Lorelle

    I personally think that plugins should work for most used systems

    But if you have certain things like working with images it REALLY helps if you have the GD or Imagick installed

    With the permalinks you need to have a certain MOD installed

    If you create a plugin I think it should be excessable to all. Thats why I use at certain plugins a lot of scripting where in latest versions or with certain installed mods / procedures it could be a WHOLE lot easier / faster...

  8. Lorelle
    Posted 11 years ago #

    What's GD and Imagick and MOD...there are folks here who don't know what these are.

    Also, when planning your plugin, how do you decide what amount of work the user will have to do, and what amount of work the plugin should do for the user?

    For instance, some plugins require the user to stick a tag in somewhere or some CSS and then fidget with the information to customize the end result. Other plugins do all the work for the user including putting CSS into the header, put codes, graphics, and tags into template files, and even add modifications to the WP Admin files.

    With the arrival of the "One Click" Plugin Manager, there is a push to have, literally, one click installations so the user won't have to do anything.

    So when planning a plugin, how much of this end user ease of use do you take into consideration? Is it important to make the plugin be one click or give the user more control over the use of the plugin? I know it "depends upon the plugin" but I'm curious if this works into your planning and thinking, and how you make that decision.

Topic Closed

This topic has been closed to new replies.

About this Topic