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.



Wordpress title showing space?
no comment on page 1371

Wordpress fun?
one comment on page 1376

Live blogging plugin?
4 comments on page 1258

Wordpress 3 admin speed up?
4 comments on page 1321

Framework photoshop?
3 comments on page 296

Fun wp plugins?
one comment on page 1376

Habari vs wordpress?
12 comments on page 440

Wp tags vs categories?
12 comments on page 7

Wordpress rss seo?
one comment on page 1361

Photo albums html5?
6 comments on page 1305

Wordpress chat?
no comment on page 1308

Wordpress exif data?
12 comments on page 230

Css sidear tab?
2 comments on page 336

Wordpress theme html5 blueprint?
6 comments on page 1305

Wordpress shortcode in plugin?
no comment on page 236

Html 50 photo album?
6 comments on page 1305

Get the post attachement?
24 comments on page 1065

Wordpress plugin development 30?
one comment on page 1373

Wordpress plugin development 30?
one comment on page 1373

Disqus formatting?
7 comments on page 1175

Html5 photoalbum?
6 comments on page 1305

Html5 photoalbum?
6 comments on page 1305

Wordpress fun?
one comment on page 1376

Fun wordpress plugins?
one comment on page 1376

Url shortener ideas?
4 comments on page 1190

Url shortener ideas?
4 comments on page 1190

Html 5 photo gallery?
6 comments on page 1305

Multiple post navigation?
no comment on page 1147

Adding images to a wordpress 3 post?
24 comments on page 1065

Html5 photo gallery code?
6 comments on page 1305

Wordpress multiple blog master?
one comment on page 1376

Html5 photo galleries?
6 comments on page 1305

Wordpress 3 tableprefix?
one comment on page 1376

Wordpress 3 tableprefix?
2 comments on page 1374

Using wordpress as a framework?
2 comments on page 335

Single post image size?
24 comments on page 1065

Get featured image src wordpress?
24 comments on page 1065

Disqus wordpress mu?
7 comments on page 1175

Image gallery html 5?
6 comments on page 1305

Wordpress theimage?
24 comments on page 1065

Wpgetattachmentimagesrc size?
24 comments on page 1065
  every 1728s, 1s ago, in 0.02s.
 __
(__)
   `
 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.

 __
(__)
   `
 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?

 __
(__)
   `
 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?

 __
(__)
   `
 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?


0.01s