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
Html 5 photo gallery?
6 comments
page 1305
Html 5 Gallery
Image gallery html5?
6 comments
page 1305
Why I Ditched Disqus
Disqus post images?
5 comments
page 1175
How To Add Sidebars To A Theme
Register sidebar in post?
10 comments
page 1053
Wordpress Vs Graffiti
Iis cms wordpress?
8 comments
page 95
3 Ways To Speed Up Your Blog Without A Cache Plugin
Wordpress cache without plugin?
one comment
page 1321
Poll Daddy Reviewed
Polldaddy?
2 comments
page 42
Updating Code Snippets Here
Fun wordpress plugins?
no comment
page 1338
Html 5 Gallery
Html 5 photo?
6 comments
page 1305
Html 5 Gallery
Html5 photo album?
6 comments
page 1305
Fun With Theme Widgets
Fun widgets for my profile?
24 comments
page 867
Quick N Dirty Admin Login Screen
Css login?
no comment
page 128
Wordpress Shortcodes What Why How
Wordpress gallery shortcode use link url?
no comment
page 236
Html 5 Gallery
Html5 image gallery?
6 comments
page 1305
Html 5 Gallery
Images gallery html5?
6 comments
page 1305
Quick N Dirty Admin Login Screen
Css admin login screen?
no comment
page 128
Html 5 Gallery
Wordpress html gallery?
6 comments
page 1305
Divine Proportions
Two columns blog proportion?
3 comments
page 145
Quick N Dirty Admin Login Screen
Intitleadmin intitlelogin?
no comment
page 128
Why I Ditched Disqus
Disqus cant login wordpress?
5 comments
page 1175
Using Your Own Url Shortener
Htaccess short url wordpress?
4 comments
page 1190
Charcoal Theme Available For Wordpress
Charcoal theme?
2 comments
page 959
Dont Mess With My Toot Toot
Dont mess with my toot toot?
15 comments
page 599
Html 5 Gallery
Html5 wordpress?
6 comments
page 1305
Dont Mess With My Toot Toot
Dont mess with my toot toot dates?
15 comments
page 599
Should Wordpress Produce A Php 5 Only Version
Compare php5 versions?
11 comments
page 35
Quick N Dirty Comment Stats
Dirty comments?
no comment
page 130
Why I Ditched Disqus
Better than disqus?
5 comments
page 1175
Html 5 Gallery
Making a photo album in html 5?
6 comments
page 1305
Post Image The Easy Peasy Way
Getpost image in wordpress?
26 comments
page 1065
Html 5 Gallery
Html5 photo gallery?
6 comments
page 1305
Ithemes Essence Review
Review of changing the essence?
4 comments
page 238
Quick N Dirty Admin Login Screen
Login screen css?
no comment
page 128
  1 query every 815 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?