
On the 26th of March, it was time for our friends at Knowit Jönköping to host the next #wpbar in the series. We were of course there and both listened and spoke. Two of the lectures were aimed at developers and one was aimed at editors. But with a developer slant. Lots of abbreviations and lolcats!
Modern WordPress development
Olaf from Knowit talked about the idea behind Bedrock-Ansible and how Olaf and his colleagues use the tool to do effective development work. With the help of the various tools included, it is easy to clone the production environment, for example, and it is easy to synchronise server software between different environments.
Olaf has written a short guide to help you get started.
Seven rules for writing good plugins
Our architect Plux talked about how to write plugins to be used for sites that have very heavy traffic. Plux went through seven “rules” that you as a developer should follow. These seven were:
- Have a strategy
- Follow code standards & write readable code
- Take security seriously!
- Have a clear documentation
- Use classes / prefixes
- Only load what you need
- Clean up after yourself!
There was a heavy emphasis on what to do and what not to do when developing plugins, and then developed into clear examples of plugins that have done a good job and a less good job. One plugin that got a boot was User Access Manager, which was highlighted as an example that “took badness to a whole new level”. Plux told us that the plugin generates huge amounts of database calls.
The plugin was highlighted as an example of failure, especially with point 6 and point 7. Another plugin that was highlighted and got a boot was Fancybox for WordPress which quite recently had a huge security hole.
Simplify for your administrators
Olaf showed how you can easily tighten up the administration interfaces for editors so as not to confuse them. Olaf said that you should always remove the Dashboard and all other features that users don’t need.
Other ways to simplify for administrators is to change the names of the buttons to something more intuitive for users, like changing “Posts” to “News” or “Blog Posts” or something similar.
After this talk, a QA was started. Many people wondered if anyone else had tried plugins they had seen that were interesting. Experience with, for example, Edit Flow and Wp-papi was requested. Another topic that was brought up was the hot potato that is git instead of svn on wordpress.org