Book Review: WordPress 3 Plugin Development Essentials

WordPress 3 Plugin Development Essentials

by Brian Bondari and Everett Griffiths

Read more about this book at Packt Publishing » or Buy it at Amazon

At root, this book is an excellent overview of the techniques and issues which will be encountered by any developer — however experienced — when they are authorizing a plug-in using the WordPress plug-in API in WordPress 3. In particular, I appreciated the emphasis on organization and coding best practices. I’ve worked with plenty of plug-ins, and there’s a lot of ugly, unmaintainable code out there. (And I’ve written some of it, too!) The fact that anybody looking to develop a plug-in who uses this book as a major reference will also get a guide to some best practices in writing software is a definite bonus.

The authors are very realistic about the limitations and benefits of the WordPress plug-in system. They observe that WordPress has a great deal of flexibility when it comes to coding style and organization — and the result is that there’s a low resistance to entry. Great for beginners, but it does mean that trusting the code you find is something you shouldn’t do blindly. Clearly the authors want to emphasize that anybody looking to begin developing plug-ins should give some significant thought to the sustainability and quality of their work. Kudos to them!

The book doesn’t cover an enormous number of different API functions, but it does give a good overview of the key hooks that are needed to get started programming for WordPress. Given the scope of what can be done in WordPress, it’s really a better solution to solidly introduce some of the core techniques rather than try and cram a huge number of concepts down the throats of their readers.

I found the systematic approach taken by the book to be extremely effective — I appreciated that the book intentionally had the reader introduce common errors into their plug-ins. Having encountered most of those issues by accident somewhere along the line, it’s tremendously valuable to already have been made aware of some key elements.

I do think that this is a good book, and very worthwhile for the beginning plug-in developer. There are a few additional areas which I would have liked to have seen covered, however.

Although the book is very thorough in addressing programming best practices, it doesn’t address the quality of output code at all. Valid HTML, consistent use of elements, semantics, and accessibility are all issues which deserve a significant mention in the programming of a WordPress extension — however easily the plug-in can be maintained, if it doesn’t produce high-quality output, this can be a major disadvantage for the plug-in. It is very dissatisfying to install a plug-in which does exactly what you need it to, but produces output which can’t easily be styled or doesn’t meet the standards required for your web site.

Nonetheless, there are no other issues which I felt were truly missed — the book is well-written, thorough, and methodical. I can highly recommend it to anybody looking to start authoring WordPress plug-ins.

Note: although this review was not paid, I was provided with a free review copy by Packt publishing in exchange for the review. It was definitely a worthwhile trade!

New Accessibility Review at Practical eCommerce

The second in my monthly column of Practical eCommerce accessibility reviews is available today! This review follows a different pattern than the previous, setting up a persona-based walkthrough of the reviewed site.

Read my review of of Pets Contained at Practical eCommerce.

It’s always interesting to see what I’ve written after the editors have had their way with it… ;)

Review: WordPress Plugin Development: Beginner’s Guide, by Vladimir Prelovac

So, a few weeks ago this handy book showed up on my doorstep: WordPress Plugin Development (Beginner’s Guide), by Vladimir Prelovac (author of the WP Wall, Theme Test Drive, and Smart YouTube WordPress plugins, among many others). Vladimir being a highly active WordPress plugin developer, it’s unsurprising that the basic premise behind the book is to learn by doing. Essentially, the book takes you on a step-by-step walkthrough of several of Vladimir’s WordPress plugins, constructing each aspect of the plugins separately and explaining the process.

Not a bad way to get a handle on WordPress plugin authoring. There may be a better way to approach the subject, but I can’t honestly say that I know what it might be.

The fact is, WordPress plugins are incredibly powerful and cover an enormous breadth of possibilities. As the guide indicates, the WordPress plugin API is essentially a WordPress-specific method of accessing the entirety of the PHP programming language. If you can do something with PHP, you can probably do it in a WordPress plugin.

The book has a basic assumption that you’re already fairly sophisticated in your use of PHP programming. Rather than hold your hands through PHP logic, the important information provided in this book is about how to make use of the WordPress specific functions which will allow your script to tie to WordPress — and the key information that plugin authors need to be responsible for the security of their own scripts.

This is an extremely important piece of information, and can’t be emphasized enough. Probably the biggest flaw in this book is that plugin security isn’t highlighted sufficiently. It’s not that the book doesn’t state clearly that plugin authors need to take care of security, but it doesn’t do it on every single page in six-inch bold type….

But I digress.

On the whole, you can learn a lot from this book, whether you’re a beginner at WordPress plugin authoring or not. The breadth of WordPress plugin capabilities means that most experienced authors don’t know everything, so there’s almost certainly something here for you — but it starts simple, and within the first 30 pages you’ll already have a usable, practical plugin written.

Accessibility Review at Practical eCommerce

Launching today, I’m beginning a new series at Practical eCommerce. This is a series of practical accessibility reviews — web sites can submit themselves to be reviewed, and I’ll take some time to review the site and write up my comments in an article format.

The goal of this article isn’t to tear down the hard work web site owners have done, so I’m not as harsh as I might be in another context — it’s also not a paid consulting review, so I’m not as thorough as I could be.

The purpose of these reviews is to provide an overview of some accessibility problems on every site reviewed; it’s superficial, but it will hopefully help make ecommerce web site owners more conscious of the issues they face with users with disabilities.

The first review is available today: Accessibility Review: Lori’s Wigsite.

I know perfectly well that this review, and the ones to come, will be leaving issues out. This is unavoidable. However, I’m interested in comments concerning these missing issues — if you are passionately concerned about elements left out, covered too superficially, or dismissed too quickly, let me know about it! I can’t cover everything, but I do want to know your thoughts.

Review of “Mobile Web Development”

Mobile Web Development, by Nirav MehtaThis new book from Packt Publishing & Nirav Mehta is a quick and effective introduction to developing websites specifically targeted at mobile device users. I say “users” for a reason — one of the strongest advantages to the book is a strong focus on considering your user and their needs as a key element of mobile web development.

My overall reaction to this book was positive. It covers a wide variety of key issues for mobile web programming in an easily understood manner. The book is targeted primarily at developers who already have some experience at web development and design, so it doesn’t delve into any serious detail when it comes to server-side programming or HTML coding, but instead makes a point of emphasizing places where the mobile web is different from internet interaction on a desktop device.

Mehta goes out of his way on many occasions to emphasize the serious importance of considering who (and what!) will be using your mobile web application.

“Any website accessed from a mobile device is mobile web — whether it’s been tailored to work on a mobile or not!” Mobile Web Development, Nirav Mehta, page 10

The book covers a wide range of issues — from developing for mobile devices using a “lowest common denominator” plan to implementing highly dynamic mobile applications which adapt automatically to the device currently in use. The text is easy to understand and follows a logical progression, starting with the mobile web development practices which are most similar to the development of standard web applications before moving into the areas which are very specifically targeted towards mobile devices.

This isn’t to say that the book doesn’t have a few flaws. I identified three areas where I really would have liked to seen better work.

Editing

In general, the copy editing on this text was pretty poor. The editing improved as I got further into the book (or I became more oblivious to it), but the introductory chapters had a lot of problems. There weren’t a lot of typos — but the grammar was noticeably lacking. The book is rife with sentences like this:

“We will need a recharge of patience if we wanted to watch a movie preview on low speed mobile networks.”

I’m not a member of the grammar police, but I’m certainly sympathetic. Professionally published books simply shouldn’t contain the kinds of errors found in this book.

Code Examples

The author talks about following web standards as a critical element of mobile web development. That’s great. It is, however, a serious pet peeve of mine to see code examples which don’t reflect the text of the book. The very first code example in the book is this:

<link rel="stylesheet" type="text/css" media="handheld" href="mobile.css">

The text preceding it states “Here’s how you can add an alternative stylesheet link in your XHTML page.” I see a problem here. Yes, the author does explain at a later point in the book that all XHTML elements must be closed: but it’s a simple fact of life that most people referencing this book will be far more likely to simply reference the code as is. This is simply a mistake; but it’s not one that should have made it through a review of the book.

I’ll admit that I haven’t gone through and checked the validation of every code example. Most of them seemed solid and accurate. There are definitely examples which wouldn’t be valid under the XHTML DocType, but I’m not adept enough with XHTML-MP to know off-hand if the same is true within the mobile profile DocType.

Appendices

Simply put, there aren’t any. There were numerous points in the book where I thought to myself that an appendix would be great. A list of resources cited by topic, a section summarizing the syntax of VXML, tables showing the differences between XHTML and XHTML-MP or between CSS and WCSS. These kinds of resources would have been tremendous benefits to the overall reference value of the text.

Overall

This is a worthwhile book. Even though I wouldn’t recommend trusting the code examples, the truth is that you should never simply take code examples as written — you learn best by taking an example and re-purposing it for your own needs. Mobile Web Development will introduce you to the key issues for mobile web programming and design in a manner which can give you a quick start on mobile web application development.

Search Marketing Standard: Print News for Online Marketing

Well, I’ve finally managed to read the entirety of the Summer issue of Search Marketing Standard — and I must say that I found it to be a pleasant read. The articles were well-written and interesting, which certainly makes for an overall high-quality experience.

If I had to say there was anything missing for me, it would be that I felt the material didn’t necessarily challenge me much. The articles didn’t make me confront new ideas about how search marketing could work, or challenge my notions of the world of search. Granted, I’m pretty well plugged-in to the industry: The fact that I’ve read moderately extensively in the search marketing field MIGHT just have an impact…. I’m not viewing the subject from the perspective of the intermediate marketing manager or business-owner who really needs the information, after all.
Read more: Search Marketing Standard: Print News for Online Marketing

Jim Byrne’s “60 Hot to Touch Accessible Web Design Tips”

Jim Byrne, the founder of the Guild of Accessible Web Designers, has recently published a collection of practical tips to help in constructing accessible web sites. If you’re confused or overwhelmed by the complexity of technical discussions on accessibility, this may be a great way into learning the basics of web accessibility.

Jim’s tips, rather than focusing on the esoteric details of dealing with multiple populations, provides simple ideas with explanations why these issues are important for accessibility.

You can buy it now at Lulu.com for only $13.34 (PDF) or for 19.95 in print.

The book is a successor to his earlier “50 Hot to Touch Accessible Web Design Tips” – there are a number of significant changes, so it’s worth considering the new version if you’ve already purchased the original. Accessibility is a constantly changing field, so keeping up with the changes through cheap PDF downloads has it’s advantages!

If you’re already an experienced practitioner of web accessibility, this book can still serve a purpose for you: think of it as a checklist. Many of the tips Jim makes are fundamental guidelines to keep in mind when focusing on accessibility: and some of them are easy to overlook when wrapped up in the design process.

This isn’t to say that the book isn’t without warts. I have to admit that, although the book provides a great background to accessibility it’s truly not very thorough. It skims over issues, it doesn’t explain anything in any great detail. If you want a quick checklist of things you should consider, it’s great. If you want to know why – you’ll need to pick a different resource. There’s room to disagree with some of the tips expressed here – but you’ll need further reading in order to start getting into these deeper accessibility conversations.

Page 1 of 212

Return to Top