ShrimpTest – how to fix incompatibilities with WordPress v3.3

ShrimpTest is a WordPress plugin with a LOT of promise.  Basically, it is an A/B testing tool for WordPress.  The plugin author, Mitcho, does a great job of explaining A/B testing and why it is important.  If you are already familiar with A/B testing, you can skip ahead to 16:03 in the video to see a demo of Mitcho presenting the plugin

Unfortunately, and this is truly a shame, the plugin also suffers from an almost complete lack of development and updating.  There must have been some change in WordPress v3.2 that stopped the plugin from working.  The effect was that the “A/B” icon in the rich text editor was missing.  Fortunately, someone figured out a work around.  The super quickest way to apply this change to the plugin is to do the following:

  1.  Make sure you’re logged into your WordPress website of choice
  2. Navigate to `http://[DOMAIN].com/wp-admin/plugin-editor.php?file=shrimptest/plugins/variant-shortcode/tinymce.js&plugin=shrimptest%2Fshrimptest.php`
  3. The second line down reads:
    1. ”     tinymce.PluginManager.requireLangPack(‘variant_shortcode’);”
  4. Comment out this line by adding two slashes before the code as follows:
    1. “//     tinymce.PluginManager.requireLangPack(‘variant_shortcode’);”
  5. Click “Update File”

You’re done!  Now you should be able to see the icon in your WordPress rich text editor.

WordPress plugin – OCD Plugin Stats

OCD Plugin Stats WordPress plugin screenshot

OCD Plugin Stats WordPress plugin screenshot

I’ve just published another WordPress plugin called OCD Plugin Stats.  This isn’t a plugin that would really interest most people.  If you’re a WordPress plugin developer and like seeing the stats for your plugins, OCD Plugin Stats will let you monitor all the stats for all of your plugins in one convenient location in your WordPress dashboard.

Unless you publish your own plugins, I can’t imagine anyone would be terribly interested in such a thing.  My reason for making this plugin was that (a) I found it useful, so perhaps others would too and (b) I wanted to learn how to create a WordPress dashboard widget.
Default Series Title

WordPress Plugin: Easy CC License

[ezcc]

I’ve written a new WordPress plugin!  It uses the Creative Commons API to grab the appropriate license based on your license choices.  While there’s still room to improve the plugin, I’m pretty happy with the way it’s turned out.  I’ve made a conscious effort to use best plugin programming practices – and learned a lot in the process. 1

You can download this Creative Commons WordPress plugin here!

Default Series Title
  1. Most of the plugin’s functions are wrapped in a class and includes a deactivation function. []

Plugin Considerations

When designing/writing software, or I suppose any kind of engineering for that matter, there is always a tension between features and complexity.  I really want this Simple Series WordPress plugin to be simple and easy to use.  But, as I use it more and more I find there are some possible features that I wouldn’t mind having.

For example, my DrawBot series is at 43 posts at this moment.  The problem is that each post, no matter how short, now has an entire screen-length’s worth of a list for the series. 1  Now, there are several possible ways to handle this:

  • I suppose when I’m looking to design a UI, the most important things to focus on is what would the user expect to see and happen.  It certainly makes sense for there to be a uniform series list in every post.  But, it seems slightly inelegant to have it that way for every single post when you’re looking at an entire page.
  • I could modify the plugin so that it would only create a list once per page, rather than once per post.  I suppose subsequent instances could then provide a single link to the series list in the initial post.  I think this would be non-intuitive as a person navigated the page.
  • I could modify the plugin so that it only showed the current post plus X posts before and after where X is some arbitrary number I choose.  (Although, I’d probably make it user specifiable).  I’d have to dig into some fancy scmancy CSS to define a different start-number for the HTML ordered list, but this isn’t a huge problem.  Ideally, it would say there are Y prior posts and Z subsequent posts as well.  Then again, it is really helpful (at least to me) to be able to click back up or down through a series list.

Perhaps the optimal result is something in between?

  • On a page consisting of a single post, the entire list should be displayed.
  • On a page consisting of multiple posts, the subsequent lists should be truncated in some meaningful fashion.  Perhaps the last and subsequent X posts, with a little sentence indicating Y more prior posts and Z more subsequent posts.  When you click on the “Y more prior posts” it could take you to the first instance of the series list on that page and when you click on the “Z more subsequent posts” it could take you to the next post listed in the series on the first instance of the series list on that page. 2
  • Sadly, this system would not really change much for the RSS feed readers.
Default Series Title
  1. I can’t even imagine how much text is devoted to just the series list on those DrawBot posts in your RSS feed. []
  2. Um.  This sounded a lot clearer in my head as I typed it than it probably reads. []

Simple Series – Half-Life; Market Research

I’m wondering at what point will the downloads on this plugin plateau.  Whatever the eventual baseline download rate, I would suspect that speaks to the amount of maximum market share that is possible for a plugin that performs these functions.1  I would think that downloads would spike when I release a new version of the plugin.  Given that I released about five updates to this plugin the first day, I would assume some of those initial downloads were duplicative.

As far as rankings go, at this time this plugin is #5 on WordPress.org’s plugin search page, #5 inside WordPress’s internal “Add New” plugins search page, and no where to be seen in the Google rankings.  Looking at Google Keywords, it appears that there’s no small amount of search traffic for the keywords “WordPress series.”  There’s some 200,000 global monthly searches.  One of the reasons I’m following this so closely is that I’ve had a few ideas for plugins that I could sell.2

Here’s the WordPress.org plugin download stats for “Simple Series with SEO!” for the first four days.

  1. 1/26/2012: 1 download
  2. 1/27/2012: 99 downloads
  3. 1/28/2012: 37 downloads
  4. 1/29/2012: 20 downloads

What will tomorrow bring?

Default Series Title
  1. I promise I won’t subject your RSS feed to my obsessive stats checking.  Much of the time I use this blog as a way to document/save/organize information that is probably really only interesting to me. []
  2. A brother’s gotta earn, right? []

Anti-Virals

Here’s the WordPress.org plugin download stats for “Simple Series with SEO!” for the first three days.

  1. 1/26/2012: 1 download1
  2. 1/27/2012: 99 downloads2
  3. 1/28/2012: 37 downloads3

It looks after being bumped from the newest plugins slot, the downloads dropped precipitously.  So much for going viral, money, and fame, eh?

Actually, I’m happy to have helped out a 100 people or so.  I also think a lot more people will end up using this plugin over time.  The alternatives, while very good, are more difficult to use and do tend to add a lot of other stuff into your WordPress installation.

Default Series Title
  1. That was me installing it in another blog! []
  2. And a blog ain’t one []
  3. I have nothing clever to say about this. []

Articles on writing WordPress Plugins

Looking back at one’s code from years prior is like looking back at a junior high school picture of one’s self.  I’m looking back at the code for my quick-and-dirty pie chart plugin and think, man, why did I write things THAT way?

In the 1,000 years since I wrote that plugin in 2009, I’ve been trying to learn and comply with best programming practices for WordPress plugins.  As a result my current plugins tend to be stripped down, simple, don’t create unnecessary options, don’t create unnecessary tables, taxonomies, special post types, or those kinds of things. 1  Learning some Object Oriented programming along the way has been super helpful.  By encapsulating your WordPress plugin code into a chunk of objected oriented programming, you reduce the likelihood that your plugins’ function and variable names will collide with those from WordPress or other potential plugins.

If you’re getting started or need to brush up on your WordPress plugin development skillz, you should definitely check out these awesome articles:2

I’d also recommend tinkering with jQuery and JSON, if you haven’t already. 3  I don’t know of any really good JSON tutorials, so if you do, please let me know so I can add it to this list.

  1. Admittedly, I’m not really shooting for super ambitious plugins either. []
  2. Mostly stolen from the WordPress Codex! []
  3. I only use JSON for passing data from the browser to the server via AJAX and then decoding into a PHP object. []

Simple Series with SEO! after just one day

I’m really happy to report that per the WordPress.org stats, this little post series plugin has been downloaded more than 100 times so far.  That’s really awesome.  And, now that I’ve figured out how to work this wacky SVN thing, I think it would be fun to release some of the other random little plugins I’ve developed over the last few years.

As of the latest version 1.4, the plugin is now easy to modify with some CSS added to your stylesheet.  I could have added this as a text field option a settings page for the plugin, but I really like the stripped down simplicity of the plugin as is.  Even with all the comment lines in the plugin, it is only 53 lines of code.  If super short code were a goal1 I could probably cut that in half.2

Now I have to find some of my old plugins that others might find useful.  I’ve got one for frame escaping, one for making pie charts…  I know there are a few other random ones as well.

Default Series Title
  1. And it isn’t []
  2. Obviously, I’m not going to do this since it would make the code next to illegible []

My first published WordPress plugin! Simple Series!

This may seem silly, but I’m really happy with having published my very first plugin on WordPress.org.

My Simple Series plugin lets you easily create and helps you automatically maintain a list of posts.  I started writing this plugin because all of the existing ones seemed really clunky and over-engineered.  There’s no need for extra tables in WordPress, brand new taxonomies, or special system requirements.  If you can fire up any recent version of WordPress, you should be able to use this plugin without a problem. 1

As much of a WordPress fanboy as I am, I’ve never actually shared a plugin on the WordPress.org repository.  It was simultaneously easier and more difficult than I thought it would be.  The page that discusses how you can contribute your plugin and talks about “checking out” files makes absolutely no mention of how you’re supposed to do this!

Apparently you require a program to connect to the WordPress SVN to check out the file and commit changes.  On the advice of Schmarty I’m using TortoiseSVN.  Once that was installed and a sub-directory selected, it was relatively easy to commit changes.  If you haven’t tried it before, this whole SVN thing feels like a clunky slow version of FTP.

Default Series Title
  1. Of course, now people are going to start e-mailing me with problems… []