WP-Fun.co.uk

Book Review: WordPress Plugin Development

I recieved my copy of WordPress Plug-in Development (Beginner’s Guide) by Vladimir Prelovac a few days ago and have been reading through it with great interest. I have long thought that this kind of book was due, in fact I even considered writing one myself, so I am really glad that one has finally arrived.

This is a Beginner’s guide, but even so there is a lot in this book. This isn’t a book on first principles alone so even if you’ve created your own plugins before there is likely to be something in this for you. The cover of the book contains the following words which seem to sum it up pretty well:

Learn by doing: less theory, more results.

The book is organised around the development of six plugins. With each chapter a new plugin is started, developed and explained. None of the plugins are simple so this really is a book for someone who actively wants to learn. Vladimir has clearly decided that you can get a ‘Hello World!’ plugin tutorial from anywhere so, while he does explain what you will need to develop plugins, for example, where you can get free tools, and does include the basic ‘Hello World’ skills in the first tutorial, he kicks off the book at a fast pace.

The benefit of this fast paced style is that every plugin is guininely useful and contains important skills and a lot of information. Each chapter also gives suggestions for how you can customise the plugin so you can do more than just follow along.

By the second plugin Vladimir will have you diving into JQuery and AJAX, in the third you’ll be creating Widgets, and by the end you’ll be integrating flickr into the WordPress admin, and creating your own post types.

When I first heard about the book there were two things that I really wanted to find out: What plugin architecture would Vladimir recommend in the book and where would he draw the line between ease of understanding and promoting best practices. Teaching someone to write a plugin is fairly easy, but teaching them to write plugins well is very difficult.

The chapters do a great job of easing the reader into the best practice concepts. In the first plugin the reader is told how to build the plugin without messing around too much. He still suggests version checking at this point, but the basic lesson is very simple. It isn’t until the third plugin that he introduces the concept of classes in plugins, giving plenty of time to get used to the core concepts first but ultimately steering the reader toward the best method.

As early as the second plugin Vliadimir is talking about security and using nonces and concepts such as caching and localisation aren’t far behind. In fact, this book contains the best explanation I have read so far about using software to create the necessary files for localisation. I can honestly say that after just a brief skim through the section on localisation I feel that I know more than from all the other online guides I have read.

Finally, Vladimir doesn’t stop at the coding aspects. He goes on to talk about distribution, promotion, providing support, using SVN (Using ToroiseSVN) as an example (again a really good introduction to it).

Downsides?

There is only one downside to the book and it was always going to be inevitable. That is that WordPress development tends to move at a swift pace. Already there are some developments, such as the improved widget code, that aren’t in the book. I don’t think this is a big issue though. Learning to develop for WordPress using this book will provide enough understanding to cope with the changes.

I wonder whether Vladimir is slaving over a second edition already? Perhaps Jeff can ask him when he appears on WordPress Weekly in a few weeks time. (27th March I think).

Conclusion

You can surely tell that I like this book. I do. I would go so far as to say that if you aspire to develop for WordPress you should own this book and if you already develop for WordPress, you should also own it, even if it is just to confirm what you already know.

WordPress Plug-in Development (Beginner’s Guide) is well prepared, well written, easy to use, and I heartily recommend it.