I recently felt like making a few banners for my plugins. First questions that came to mind: "what's the name of the file again? what dimensions?". And then, while making stuff: "will this be hidden by the plugin's title?"

So, I made this simple banner template as a Photoshop PSD file. Nothing genius but feel free to use. No excuse not to add some fancy eye candy to your best plugins!

banner-template

I released a number of WordPress plugins over the last 10 years ("24 plugins and 1,062,110 downloads", says my fun bookmarklet) and they all mostly fall in one of these three categories:

  1. Outdated stuff that are no longer maintained because I don't need them anymore
  2. Simple stuff that don't require any maintenance because they just work and will probably work forever
  3. Stuff that are still maintained because I still need them

That third group recently motivated me to move some plugins to Github so their dev will now happen there.

It was recently brought to my knowledge that my most popular plugin, Ozh' Admin Drop Down Menu, causes 404 on dumb dashicons requests. That shall be fixed.

So. Anyone fancying a pull request and fix that now? :)

Twitter is fun and catchy, but the thing is: once tweeted, gone forever. Found an awesome link last month, shared it with a relevant #hashtag? Good luck finding it now. Your data now lives and dies on Twitter and you have no hand on it.

Four years ago to address this problem I made yet-another-Twitter-to-WordPress plugin, creatively named Ozh' Tweet Archiver.

Two years ago Twitter broke my plugin with their new API, requiring OAuth for every request, including reading public tweets. Fixing it has been since on my todo list but, hey, you know.

Two weeks ago @EHER sent me preliminary code to fix things, just what I needed as a motivation to fix things.

Two days ago I published version 2.0 of my super cool Tweet Archiver plugin. Fixed, dramatically improved, with new features. w00t.

TL;DR: from @ozh to planetozh.com/tweets with WordPress, #yay.

Go get it, install it, you'll love it. Or, as usual, 120% refunded!

In: , , , On: 2014 / 01 / 22 Short URL: http://ozh.in/x2

There's a recurring debate about WordPress and whether they should keep code compatible with PHP 5.2 or drop it and bump the requirements to a newer PHP version. Hey, I have an opinion on this.

What's wrong with PHP 5.2?

Nothing much, except PHP 5.2 was released in November 2006, and was maintained and developed till January 2011. This means that it's now considered an old release, rusty dusty code that's no longer improved, and should a new vulnerability be discovered in the 5.2 branch, it will remain unfixed.

In short: it's *old*. Any PHP library you'll find these days requires 5.3+.

Old but still everywhere ?

According to W3Techs, 33% of websites running PHP are on 5.2. That's a lot, but wait, there's worse.

According to WordPress, more than 50% of WordPress-powered sites are still on 5.2. Earlier this week @dd32 made a pretty graph showing that PHP 5.2's share is only slowly decreasing.

So what?

Dropping a platform running half of your user base would be crazy, right? For sure. Except I think the numbers are somewhat skewed.

As you may know, my pet project is a self-hosted URL shortener, YOURLS, which was released in its version 1.7 earlier this month. This new version comes with a phone-home feature to report the same kind of stats that WordPress is aggregating from its users, and particularly what PHP version YOURLS is installed on.

Of course, the YOURLS user base is nowhere near as important in volume as WordPress' market, but I think the average user is similar, so YOURLS figures should be relevant in some way.

What I've learned since the release of YOURLS 1.7 came as a surprise: I was expecting a similar share to what WordPress reports, but it turns out only 10% of YOURLS installs are running on PHP 5.2

yourls_php_version

What did I conclude from all this?

1. Old installs vs new installs

WordPress is old, it's been around for 10 years. The typical WordPress user installed WP 4 or 5 years ago, when 5.2 was still the standard.

YOURLS is much younger, it's been around for 4 years, but the project sort of picked up 3 years ago with YOURLS 1.5, released in November 2010. The typical YOURLS user installed YOURLS 1 year ago, when the default hosting setting on most host was PHP 5.3 or more.

I think that's the key of the skewed numbers : simply too many WordPress installs were around when PHP 5.2 was the default, and those users just did not upgrade their hosting. Well, why would they, it just works fine.

That would be exhibit A : newer users are on 5.3+, older are still on 5.2.

2. Deeper digging: who's running PHP 5.2?

Most host, if not all, still offer 5.2, even if you open an account today, but I could not find any which does not support 5.3+. All the major hosts (Dreamhost, Bluehost, Hostgator, etc…) have 5.3 by default.

And if there is a minor host where PHP 5.2 is the best you can have, then what's the point with signing with a smaller and lesser known company if they cannot provider better services than big ones?

Exhibit B: hosts can give you 5.3+

3. WordPress should lead

And that will be exhibit C: WordPress has the power.

WordPress runs on 20% of all websites in the world. That's huge. Moreover, it apparently has 60% of the CMS market, which is also very impressive.

Few organizations in the world have the power to say "we're moving to a newer version of PHP" and have a global impact ; WordPress is one of them.

With such an influence, WordPress should even go a step further and pro-actively announce end of support for PHP version and follow PHP's 3 year release process, instead of simply watching user adoption. PHP 5.3 will be maintained till July 2014, PHP 5.4 will be maintained till March 2015: I think WordPress should announce the same minimal requirement changes.

TL;DR

The day WordPress says "we require PHP 5.3″, the whole web which is still running 5.2 switches to 5.3. Simple as that.

In: , , On: 2014 / 01 / 13 Short URL: http://ozh.in/wz

I've always had a fascination for Github timeline graphs since they released it. It's simple and pretty and potentially meaningful (and fits nicely on a geek tshirt). Yes, it may say things about you.

The following is an attempt at decrypting what a few actual Github timelines say, or might say, or don't say at all, after a thorough and thoughtful psychosocial analysis that guarantees an accuracy of roughly 2% in the best case ;)

I'm a student

audreyr

"I love this thing, but unfortunately I haven't got much time for it except during summer holiday and a couple days during holiday season. Also, I wish I could spend more time on this!"

I have too much time on my hands

contributions

"Oh my, I love that tool I love that site I love that timeline graph I have to make something witty with it. Also, I suck at pixel art."

I'm a reliable guy

nathanrice

"Github is not my primary dev platform. This said, I have a few projects hosted there, and they're all maintained. Also, count on me to monitor open issues and answer them in a timely manner."

I'm a nerd. No, wait. I'm THE nerd

sferik

"It's already 10am and I haven't committed anything, I'm starting to feel fuzzy inside, I should get back to work. Also, my command line Twitter client t is pretty neat"

I'm an annoying noob

noob

"Hi! I've just created an account here on Github to open an issue that's obvious but I can't be arsed to search or read the wiki first. Also, I need to install Facebook on my Mom's computer, how do I do that?"

I'm a professional. 9-17, Mon-Fri

weierophinney

"I use Github at work, but week-ends are not for work, they're family time. Also, Boss, please, I had only one week off during July and another for Halloween, I need holidays!"

I'm new and I'm hooked

julycoding

"Hi there! I'm new here and what can I say, I *love* it here! Woohoo! Also, I'm super enthusiastic!"

I'm handsome, sympathetic and smart

ozh

"During July I take a month away from computers, no need to bother opening issues here. Also, YOURLS 1.7 is just out, did you update?"

In: , , On: 2013 / 06 / 04 Short URL: http://ozh.in/we

I really like how Github displays your yearly code contributions, in that 52×7 green dot matrix. It's cute, informative, and has become iconic enough that any nerd knows what it refers to.

contributions

I like it so I funcoded a script that will deliver a message after 365 days of running — fun, but kinda slow, right?

So, I made something more interactive and instantly fun, something you can play with: I'm delighted to introduce contribution.io, a site to "Generate Github-like contribution graph" and print them on a t-shirt (or just save them as a PNG for whatever use you'll like)

It's neat with short messages that fit the grid, works best with capital letters but hey, experiment:

at_ozh

hello-world

I've had great fun coding that site, especially the server side PHP script that generates the matrix from the letter input. It was also my first experiment using Bootstrap and I must say it's pretty neat for the design-impaired people like myself.

The t-shirt printing is powered by Zazzle: their API is decently documented and I've bought a couple of shirts from them in the past and have been pleased by the quality. I ordered myself a tshirt with "@ozh", can't wait to show it off at work :>

Go ahead, play with contribution.io and make some cool contrib graph. You'll be the coolest looking nerd on the beach this summer :)

As of writing, the 26 WordPress plugins I have hosted on wordpress.org have been downloaded one million times.

1M

Of course this is mostly due to my most popular plugin, Admin Drop Down Menu, which has been downloaded more than 700,000 times over the last 6 years, but this is a cool mark anyway.

Is there something like a millionaire club? :)

In: , , On: 2013 / 05 / 07 Short URL:

A quick ping today by Jeff Chandler reminded me that nine years ago this blog started running on WordPress. Time flies when you're worry-free :)

So, before everyone celebrates WordPress' 10 years birthday, I'll blow a few candles first: happy 9th birthday planetOzh :)

In: , , On: 2013 / 04 / 24 Short URL: http://ozh.in/w9

As you might know, YOURLS development is now hosted on Github. It's now easy to download the current development snapshot, since Github provides an archive/master.zip.

But not so long ago, YOURLS dev was hosted on Google Code, where there is no such convenient way to download the current SVN trunk as a .zip archive. To generate "nightly builds", I wrote this little script:

  1. #!/bin/bash
  2. # Simple bash script to generate YOURLS nightly builds
  3.  
  4. # Export in a year-month-day directory
  5. PWD="/home/ozh/yourls.org/nightly-builds"
  6. BUILD=$(date +%Y-%m-%d)
  7. svn -q export http://yourls.googlecode.com/svn/trunk/ $PWD/$BUILD
  8.  
  9. # Make package and remove dir
  10. cd $PWD
  11. zip -r -q yourls-$BUILD.zip $BUILD
  12. rm -rf $BUILD
  13.  
  14. # Remove old (>7 days) builds
  15. find $PWD/*zip -mtime +7 -exec rm {} \;

Now you just need to add the script to your cron jobs and call it every night.

As soon as YOURLS 1.6 ships, I'll move the project development from Google to Github (why? long story short: read this). So, I wrote down a little todo list to make sure the transition is as smooth as possible for everyone, which is:

On Github

  • Move in issues and tickets from Google. I wrote a tool for this
  • Move in wiki documents from Google. There are a few tools around, like wikiconvert.py, but in worst case scenario doing it by hand is an option.
  • Neatly organize the wiki on Github with a home page, sidebar, header and footer. Everything is explained in this article.
  • Make a custom CONTRIBUTING.md with a few guidelines (aka RTFM). This one is a very comprehensive start.
  • Create labels for issues: I was thinking bug, enhancement, duplicate, invalid, wontfix, RTFM, PEBKAC, worksforme, possiblewithaplugin.
  • Tag older commits in Git to recreate the same download list as in the original project
  • Maybe clarify the dev and branch strategy, such as in Zenphoto-Development-Process

On Google

Simply mention that the project has moved: modify issues, frontpage and wiki with the adminTabs feature at http://code.google.com/p/YOUR-PROJECT/adminTabs. Example.

Misc downloads

The inability on Github to host files other than your source code bugs me. In YOURLS there are a couple extra files that are available for download, or images used in the wiki documents.

So far the idea I've come up with is: create a branch named downloads and commit those little files there.

And?

Am I missing something? Any idea welcome :)