WordPress Plugin Development (Beginner’s Guide)

| Created: July 22nd, 2009
WordPress Reviews 5 Comments

This is perhaps my most overdue post ever – a review of Vladimir Prelovac‘s book, WordPress Plugin Development (Beginner’s Guide) [note: that’s an affiliate link].

I’ve had other posts that I’ve promised to write that I’ve had trouble finding time to deliver. In this case however, I actually accepted a review copy of the book, so I really should have written about it before now.

In my defence, we had a new addition to the family and we’ve been undergoing major changes at work, so I’ve been spread pretty thin.

Also, because I live in Australia, Packt Publishing could only send me the eBook version. In many ways, I prefer ebooks – no more leaving books behind when you change country! In this case however, having a physical book in front of me would have meant I’d have been more likely to pick it up.

Anyway, enough with the excuses and on to the review!

Book Details

  • Title: WordPress Plugin Development: Beginner’s Guide
  • Author: Vladimir Prelovac
  • Publisher: Packt Publishing
  • Paperback: 278 pages [191mm x 235mm]
  • Release date: February 2009
  • ISBN: 1847193595
  • ISBN(13): 978-1-847193-59-9

Who The Book Is For

I’ll just quote the book on this one:

This book is for programmers working with WordPress, who want to develop custom plugins and to hack the code base. You need to be familiar with the basics of WordPress and PHP programming and believe that code is poetry; this book will handle the rest.

That seems to be WordPress Plugin developers, WordPress Theme developers, those providing web development services based on WordPress and maybe some power users wanting to push the boundaries a little.

If you don’t have any experience with PHP (or jQuery for that matter), you might just get by, but I’d advise you to at least read up on the basics before you jump into this book.

What The Book Covers

The book covers most of what you’ll need to get started writing WordPress plugins – the right way. The topics covered include (in no particular order):

  • The basics of the WordPress plugin architecture and the API used to hook into the WordPress functionality and manipulate it.
  • Interacting with the WordPress database
  • The use of custom fields to store data.
  • Creating widgets (though not using the new WordPress 2.8 widget api)
  • How to use both jQuery and AJAX within a WordPress plugin
  • Working with third party APIs such as Flickr
  • WordPress Plugin security
  • User roles and permissions
  • Localising WordPress plugins (ie to support other languages)
  • Managing the plugin options.
  • Maintaining WordPress plugins (including adding them to the WordPress Plugin repository)

In short it covers a LOT. As I said, everything you need to know to write WordPress plugins.

The Positive

I’ll be honest – I haven’t read the book from cover to cover. I have read the first 3 chapters in their entirety and have skimmed the rest of the book, digging into some areas a little more. However, I’ve seen enough to get a good feel for the book and to know that I like what’s in it.

The book’s tagline is "Learn by doing: less theory, more results". It teaches by example, rather than pushing a whole lot of theory at you.

The book walks step by step through the development of 6 real life WordPress plugins, covering the various issues that arise for each plugin and how to resolve them. Using real life examples makes it much easier to understand the concepts that Vladimir is teaching.

In my opinion, Vladimir has done a great job of choosing plugins which allow him to demonstrate all the things he needs to, without having to contrive situations just to demonstrate something. He weaves all the complex information together, giving you a little bit at time but building on it and reinforcing it later.

The source code is available for download, allowing you to try it out yourself without typing it – although if you’re a beginner I’d recommend that you do the hard way and type it. You’re much more likely to remember things that way. The source code is also a great starting point for you to start experimenting on your own.

I learnt quite a few things from the book – mostly things I’d heard of before, but hadn’t gotten around to learning about – but the book laid them out in a simple straight forward way making it easy for me to quickly understand.

Perhaps the best feature of the book is that Vladimir follows ‘best practice’ methods for creating WordPress plugins. Are you not quite sure about any of the following:

  • using nonces to make plugins more secure (and other security issues)
  • using wp_enqueue_script to load scripts rather than just calling them directly
  • localizing your WordPress plugin so that it can easily be translated into other languages
  • using shortcodes to call plugin functionality directly from the post body

This book will make it clear just how to use these features and so much more. Whatever Vladimir does in the book, he uses best practice methods.

This is great both for new plugin authors (who’ll learn to do things the right way) and for existing plugin authors (such as myself) who need a refresher on the best way to do things in WordPress. There are plenty of us out there who have written plugins that work, but which could be written better.

I’ve been planning to go back and update my plugins to take this into account. When I get around to doing so, I’ll be consulting this book again for a good overview of what I need to do (and why).

The Negative

There are very few negatives with the book. The content, by and large, is excellent.

I did notice a few spelling errors. That’s always possible with large books, but ideally the editor should have picked them up.

The only other thing I noticed is that the order (within each section) takes a little getting used to. Vladimir pushes through the example, then explains what happened afterwards. For me this approach is a little counter-intuitive. However, you get used to it and isn’t a big problem. In fact some even think that this is a strong point:

Each mini-tutorial (”Time for action”) section is followed by a “What just happened?” section that let’s you take a breather to understand what you just did and why you did it. I believe that this pause for explanation is the key reason why it is so easy to learn from this book.

Other reviews have mentioned that the book is a little fast paced. Perhaps, but it didn’t worry me and of course you can work through the examples at your own pace.

Question Marks

I do have some concerns about this book – not to do with the content, which is excellent, but to do with the very concept of a book on WordPress plugin development.

Out Of Date Content

I didn’t put this in the Negatives section, but I easily could have. WordPress is being updated all the time at an astonishing rate. Can the book keep up with this? The widget api was been overhauled as part of WordPress 2.8, meaning that section of the book is out of date already.

Vladimir will be on top of such changes and I’m sure there will be revised editions of the book, but the nature of a book on WordPress is that it will be behind from almost the minute it’s published.

Free Alternative Information

All of the information contained in this book is available free of charge elsewhere online.

Sure it may not be available in one place and ordered in such a useful way, but there are volumes written on WordPress plugin development. I’ve always found that a combination of the WordPress Codex, Google and the source code have been enough to tell me everything I need to know. I probably wouldn’t have gone out and spent money on this book because I’m comfortable with finding information through these alternative sources.

That’s not to say that such a book doesn’t have a place: It would be very useful for someone starting out on WordPress development who wants all the information up front without having to go out and search for it. The way I see it, this book is not a necessity, but is a luxury that will save you time.

Size Of Target Audience

Lets face it – when you round up all the WordPress plugin authors, there’s not too many of us and many won’t buy such a book.

There are more WordPress theme developers out there and I suspect that they will be a big target audience for this book – many of them are looking to extend their WordPress skills and to build more plugin-like functionality into their themes. However, there are other books coming that may appeal to theme developers more, as they are less plugin specific.

Perhaps the key to the success of this book is the rapid growth in the use of WordPress by web development agencies to provide solutions to clients. Is it enough to sustain several books on the topic (particularly in light of the other concerns above)? Only time will tell.

Conclusion

WordPress Plugin Development: Beginner’s Guide is a very good book. It covers everything you need know about writing WordPress plugins and it teaches by example rather than by lecturing.

That said there are question marks about the book – most notably how quickly it will go out of date due to the pace of development of the WordPress core.

For me, it won’t replace the WordPress Codex and Google as my prime source of information, but it would be very handy to have on a shelf to turn to from time to time. It would also be an excellent starting point for those just getting started with WordPress related development.

5 responses on “WordPress Plugin Development (Beginner’s Guide)

  1. RT Cunningham

    One of my long-term projects is to build a blog platform that doesn’t require anything more than installing XAMPP, EasyPHP or other sandbox setups to write and edit and then publish using PHP’s built in FTP process.

    I dislike the admin backend for WordPress. It seems that half of the code or more is dedicated to securing the backend. With no backend, security isn’t a problem and the whole thing can be a lot leaner (which equals faster).

  2. james M

    Is there a digital version of this book? I have saved a lot of information in my harddisk from tidbits of information I find in the internet about doing plugins. I’ve recently tried opening the innards of some plugins I have been using and checking out what makes them tick. If my interest sustains me, I’d probably be able to cook out some kind of plugin one day, at least for my own use.

  3. Rick @ Nikon Camera Bag

    Thanks for the review. With a myriad of how-tos and guides, it is overwhelming and hard to keep up. I need something that as you described about this book is less about theory and more about results.

  4. bbJ@PhotoScanner

    Yeah, digital is in these days. In fact a lot of readers today are turning paperless by scanning their books into pdf forms. This way they could carry a whole library with them anywhere in USB disks.

    Hopefully this plugin development book has digital version too.

  5. Darren (Green Change)

    Is there an eBook version of this available? And if there is, does the author update it as WordPress evolves? If both of those answers are ‘yes’, then I think it’d be a real winner.