Great Strides in Pizazz

Not too long ago I released a WordPress plug-in I call Pizazz, which you can read more about here. It aggregates a Zazzle feed based on a few query terms and produces a randomized product display in a widget. It is highly configurable with options such as row/column count, thumbnail background and thumbnail size (a thumbnail size of zero will completely result in a text-only listing) and allows you to set the associate referral identifier (hereby “associate ID”).

The associate ID allows you to earn 15% of all purchases made through a click on one of the widget’s links, which means you can make money even if you’re expanding past your own gallery. With the right audience, this could make you gobs of money. Sadly, some of my competitors choose to switch out your ID with the widget author’s half the time (sometimes without telling you), and some now even use the widget author’s exclusively! This is the primary reason I wrote the widget. I have no intention of trying to make money in such a sneaky fashion, and at this time I’m not even asking for donations. It was mainly intended for a friend of mine, but is extensible enough in which I found it might be helpful to others. Users, in turn, provide me useful bug reports, which I greatly appreciate.

In a bit of a rocky start, I got a bug report in the first day caused by a PHP exception. It was a syntax error referring to a goto statement. It turned out that goto has just been added to PHP 5.3 — the version I tested with — and there are plenty of people still using 5.2. It was a simple fix, and many goto-haters will be satisfied to know that the code is now goto-less (many call it the bulldozer of computing — it’s a hideous way to go but can occasionally be a good choice). I now used multiple functions and return in its place, which is, admittedly, cleaner.

That fix caused the release of Pizazz 1.0.1. Sadly, I didn’t test as well as I should and a new bug found its way through the gaps. It was caused by my small bit of code restructuring. The See More link was broken (it only went to *Sigh*

I threw the fix to the code repository — well tested, of course — but then found myself hesitant to release 1.0.2. After such a short amount of time, I needed something more to post. Something that would push Pizazz onwards and upwards…a new feature.

Then it hit me: I was getting a lot of reports of Pizazz reporting that Zazzle was unavailable or that there was a problem parsing the RSS feed. Zazzle doesn’t have the fastest servers pushing out the feeds, and during the “Day of </rss></body></html>“, as I like to call it, Zazzle’s code was screwing up the feed.

The solution popped into my mind from examining how other people chose to implement their Zazzle feed aggregation: caching. If the feeds are cached, then when Zazzle connections are spotty or the RSS being returned is malformed, there will still be a backup stored locally on the user’s server.

Well, it took a few days to complete, but it’s now in. It’s the whole point of this post. It’s the thing that will push us on to 1.1.0. Caching has been implemented, and not only does it fix all those Zazzle connection issues, but it also made my test website load ~0.75 seconds faster!

It’s now available in the development branch of Pizazz, downloadable at WordPress.ORG. I’m waiting until I can enlist some testers and try it out on a few of my other local server setups, but 1.1.0 should be coming soon, ready for your monetization!

Remember, I run on bug reports. If you encounter a problem, please tell me! I can’t fix it, otherwise. I also don’t have any access to the Zazzle Pro forums, so any posts there would be routed through my friend, which is not too efficient. I appreciate every single one of your posts like they’re delicious candies.

– Luiji

Be Sociable, Share!

One thought on “Great Strides in Pizazz