888888.888888.88""Yb..dP"Yb..8888b..Yb..dP.88b.88....db....8b....d8.88..dP""b8..dP"Y8
88__...88__...88__dP.dP...Yb..8I..Yb.YbdP..88Yb88...dPYb...88b..d88.88.dP...`".`Ybo."
88""...88""...88"Yb..Yb...dP..8I..dY..8P...88.Y88..dP__Yb..88YbdP88.88.Yb......o.`Y8b
88.....888888.88..Yb..YbodP..8888Y"..dP....88..Y8.dP""""Yb.88.YY.88.88..YboodP.8bodP'


88b.88.888888.888888.Yb........dP.dP"Yb..88""Yb.88..dP
88Yb88.88__.....88....Yb..db..dP.dP...Yb.88__dP.88odP.
88.Y88.88"".....88.....YbdPYbdP..Yb...dP.88"Yb..88"Yb.
88..Y8.888888...88......YP..YP....YbodP..88..Yb.88..Yb

January 15, 2008

Weblog tools collection has a copy of a forum post made by Weathervane about WordPress plugin standards I’ve taken a read through these standards and these are my thoughts.

Jeffro makes the point that there are a few of these points that are easily solved by the use of the official WordPress plugin database. I totally agree on this point.

I have taken to releasing plugins in two ways. If I intend it for distribution and use (official release if you like) then I will use the plugin database. This provides version control and automatic update notification to users and defines a folder structure automatically.

Where a plugin is an example of functionality or a proof of concept then I will make it available on my website.

I do think it is important that people downloading a plugin from the database should expect a certain level of quality and completeness and for that reason I distinguish between the two methods of making a plugin available.

One thing I would like to see added to the database itself is a feedback mechanism for support. One the criticisms made by Weathervane is that too many comment lists are often full of praise posts and this can make it difficult for users with a problem to find a solution in the comments. I agree, but I am still not comfortable deleting comments, even if they don’t actually add value to the conversation.

In the comments Ronald has suggested that the WP Support Forums are used to provide bugs/feedback. I think he has a good point, but it does create a third place for plugin users to check and requires authors to read a lot that may not apply to them. Part of the need for standards is also a need to standardise where people go for support and I expect users will still ask questions in comments and by e-mail.

The Reader Appreciation Project has long advocated separating trackbacks from comments regardless of the content of the post. Doing this certainly makes the post easier to read so if you don’t do this I would certainly agree that turning off trackbacks would be a good idea.

Operations Conventions

On the whole I agree with the points in this section of the list but it does bring up a question for me about what we should be able to expect users to do, or not do.

Weathervane asks that we clearly state the conditions required for the plugin. This is a good point, but, I would like place some responsibility back on the user as well.

He asks that we state whether files have to stay in the folder provided, if the folder provided must be named as it is, and whether plugin files can be renamed.

My answer to that is that in all instances you cannot change anything if you expect it to work.

The plugin author should be responsible for naming things so they are likely to be unique, and properly filing them, but from the moment of unzipping, that plugin should be considered whole and indivisible, unless explicitly stated.

Structural Conventions

I think this section is particularly important, partly because I disagree with some of these points.

If your plugin is only one file then put it in a subfolder called “plugins.” Everything else should be in the root folder.

The WordPress plugins database creates a folder automatically and this really helps the unzuip and go process. I don’t think that plugins should reside in the plugins folder ever. Not because there is necessarily anything wrong with it but because it creates this kind of confusion.

Unzipping the plugin creates a folder. Inside that folder is a readme file, and the plugin file, plus any other documents required.

Now for the biggie: Some plugins have files that go into multiple folders (/plugins, with others going elsewhere, like /wp-admin). The plugin could uncompress to a folder called /installation with two folders in it: /wp-admin and /wp-includes/plugins, containing their respective files—or something like that. With this structure I only have to drop the folders in /installation into my WordPress folder and it’s done.

Should plugins really contain files that will go into a folder other than plugins? In my view no. Never. I really think one of the standards should be that every file necessary is contained with the plugin’s folder.

Some of my own

Weathervane’s list was a good list, and gave us some things to think about, but we all need to chip in and add to that, so here are some of my own.

Plugins shouldn’t try to style parts of the admin page differently, for example, using image replacement techniques to make the admin page header look fancy. I can understand wanting to use less verbose, or more accessible HTML, and that is fine, but the normal user shouldn’t see a difference in the actual appearance, or everyday use.

Secondly, it may be a good idea to develop some plugin design patterns.

In some ways I have done this for the people using my fun-with-plugins tool, but of course the code that produces isn’t open for review and so doesn’t really count.

I think plugin patterns would not only help new developers avoid reinventing the wheel but also make it easier to produce plugins in general.

I’m really interested to see what the standards drive comes up with. I think it is great that the discusion is happening but it does need to be more just a discussion, so if anyone has any wise words about next steps and how to centralise this process chip in please. I suspect the codex is the way to go but a certain level of agreement is probably needed first.

Html 5 Gallery
Html5 gallery?
6 comments
page 1305
Why I Ditched Disqus
Add wordpress comments to friendfeed?
5 comments
page 1175
Quick N Dirty Post Exclusion
Fitler theloop addfilter?
11 comments
page 124
Using Your Own Url Shortener
Constructor and link shortner?
4 comments
page 1190
Quick N Dirty Post Exclusion
Filter wordpress posts plugin?
11 comments
page 124
My Experience Of Flexx
Flexx of genesis wp theme?
4 comments
page 1026
Html 5 Gallery
Html5?
6 comments
page 1305
Wordpress Chat
Tchat page wordpress?
3 comments
page 1308
Post Image The Easy Peasy Way
Wp add attachment?
26 comments
page 1065
Html 5 Gallery
Html 5 gallery?
6 comments
page 1305
Html 5 Gallery
Pictures html5?
6 comments
page 1305
Html 5 Gallery
Pictures html5?
6 comments
page 1305
Post Image The Easy Peasy Way
Wordpress attach images to post?
26 comments
page 1065
Post Image The Easy Peasy Way
Wp post orderby?
26 comments
page 1065
Auto Cycle Fun With Sidebar Tabs
Wordpress make your plugin updateable?
one comment
page 1129
Wordpress Chat
Postimagetheeasypeasyway?
3 comments
page 1308
Using Your Own Url Shortener
How to flushrewriterules?
4 comments
page 1190
Custom Hooks For Admin Pages
Addaction adminpost?
one comment
page 430
Custom Hooks For Admin Pages
Addaction adminpost?
one comment
page 430
Wordpress Chat
Chat themes?
3 comments
page 1308
Html 5 Gallery
Html5 photo gallery?
6 comments
page 1305
Html 5 Gallery
Html5 wordpress?
6 comments
page 1305
Post Image The Easy Peasy Way
Wordpress postimage img tag?
26 comments
page 1065
How To Add Sidebars To A Theme
Add more than one widget area to wordpress?
10 comments
page 1053
Html 5 Gallery
Photo gallery in html 5?
6 comments
page 1305
Quick N Dirty Admin Login Screen
Admin login?
no comment
page 128
Why I Ditched Disqus
Disqus themes?
5 comments
page 1175
My Experience Of Flexx
Ithemes flexx theme?
4 comments
page 1026
3 Ways To Speed Up Your Blog Without A Cache Plugin
Wp plugin speedup page?
one comment
page 1321
Theming Habari Vs Wordpress
Habari vs wordpress?
13 comments
page 440
3 Ways To Speed Up Your Blog Without A Cache Plugin
Comment on a few ways to speed up your blog?
one comment
page 1321
Html 5 Gallery
Image galleries wordpress html?
6 comments
page 1305
Wordpress Chat
Wordpress chat?
3 comments
page 1308
  1 query every 1256 seconds, updated 1 seconds ago.
Thursday, 7am
 __
(__)
   `

 Andrew Rickmann

From the responses on your WLT post I think there are a few people that wouldn’t be too happy at having standards imposed on them officially. Even if it is just for the repository.

In general I like having defined standards to work to as it makes my life easier, and makes it easier for me to learn how to do things better.

Wednesday, 10am
 __
(__)
   `

 Jeffro2pt0

Or, should the standards or guidelines be in affect for only those plugins that want to be hosted in the WP Plugin Repository and everything else outside of the repository is fair game for the plugin author to do what he thinks is best.

But you bring up a good point in that, it would still be nice to see some sort of UNOFFICIAL list of guidelines that plugin authors could CHOOSE to follow if they wanted to. Perhaps the reason so many plugin authors do the things they do is because there is no list of guidelines to follow?

Tuesday, 11pm
 __
(__)
   `

 Andrew Rickmann

I’m not sure. It seems to me that the people who want a standard will follow it, and those that don’t, or don’t agree with it, just won’t.

Perhaps, rather than aiming for something official, we should simply create an unofficial standard and see if people are interested in following it, or if there is an advantage in following it?

Tuesday, 7pm
 __
(__)
   `

 Jeffro2pt0

I love the way you look at the WP Repository as a way to release an official or widely used plugin versus releasing a hacked file on your site. That’s the argument I’m trying to discuss in favor of the Repository system. No need to force plugin authors to code their plugin so that it meets the repositories requirements, but the repository should be viewed as the BIG BOYS area of plugins where the end user’s expectations for plugins are high.

It would be nice though if plugin authors abided by some sort of guidelines, even with their small file hacks. But I realize that WordPress is as open as an open source project can be, and any guidelines that are presented could just as easily be ignored.

The more I think about these plugin issues, the more my head spins around on my shoulders lol. There are so many different ways you could take this.

But I agree. We are in discussions right now and are not doing any real work in terms of getting things done. Perhaps filing something in the trac system would be the way to go?