
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.
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.
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.
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.
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.
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?
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?
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?