I've tried various plugins to backup my tweets into WordPress but none did really the job (actually most were doing much more stuff I didn't need, and most didn't keep track of the "in reply to" bits I wanted to have), so I made my own, which has powered my tweet archive for some time now.

The plugin is now available for anyone interested: Ozh' Tweet Archiver (along with my archive's theme if you need an example). Cheers!

Recently, as part of a broader redesign, the plugin pages on WordPress.org have begun to reshape. There are some nice addition, for instance now voting that a plugin is broken sends you directly to the support forum to state your problem. But there are changes that I strongly dislike, in particular the removal of the author name and URL, and many think that way.
Read More

… where "making an UI" means coding the plugin option page, making it understandable, carefully pick some wording, don't overwhelm with unneeded explanations but make sure everything is crystal clear, throw a bit of jQuery to make the page more functional.

… and sometimes I'm a bit fed up with this pattern. Note that it's probably because I lack UI design skills.

NB: If you found this post title to be deceivingly catchy and overselling, you're right.

My latest tshirt is so insanely full of awesomeness that I will have to blog about it on a weekly basis to share how much I dig it. Seriously, every time I pass nearby a mirror, I just stop and contemplate it for 10 minutes.

I got it after @Viper007Bond mentioned a cool wallpaper which led me to search for more and find it on Red Bubble. I had it ordered within seconds, delivered within a couple of days and boy it is sweet. Quality is superb and the printing looks nice and long lasting. A nice touch on this site is that when ordered a shirt you can send a note to the artist who designed it :)

I have a few really cool tshirts, and I just love tshirts anyway (who doesn't?) so a friend suggested I maintain a simple gallery with pics of them. Will do.

Got to go, I have a complete collection of Calvin & Hobbes to read once again.

Lately, every time I manually flagged a comment as spam, I started to have the impression that they all were posted on the same post, namely an old announcement for my plugin "Absolute Comments".

An SQL query later, my impression was confirmed: this blog post *is* a spam magnet:

I suspect that some particular keywords in page titles act like pheromones to spammers. These keywords probably include "comments", "guestbook", "feedback" and anything that will make them think there's a form they can spam.

The SQL query I used to list blog posts sorted by the number of spam they get is:

  1. SELECT COUNT(wp_posts.ID) as spam_count, wp_posts.ID, wp_posts.post_title
  2. FROM wp_posts, wp_comments
  3. WHERE wp_comments.comment_approved = 'spam' AND wp_comments.comment_post_ID=wp_posts.ID
  4. GROUP BY wp_posts.ID
  5. ORDER BY spam_count DESC

If you want to play with it, I made a quick standalone script that will run the query and output a pretty interactive pie chart. Download spam-magnet.txt, rename as .php and put it in your blog root (where wp-load.php is). Live demo: spam-magnets.php.

Edit: per request, I've made this a plugin too.

If you run it and notice a pattern on your blogs too, share your analysis! I've always enjoyed useless fun stats :)

So, peeps, I have good news and bad news. And by good news, I mean super mega hyper exciting announcement.

The good news: three persons, carefully handpicked among all the three most important people in WordPress, are writing a book, I mean, THE book, on WordPress Plugin Development. These three fine chaps are Brad Williams, Justin Tadlock and me.

Let me rephrase this in a way that will more reflect my state of mind and how I think about this. OMFG I'm writing a fucking book!!!1!!one!!eleven

Ozh' State of mind (allegory)

The book, entitled "Professional WordPress Plugin Development" (yeah, my suggestion of "Pluginz That Pwn" didn't make it through) should hit shelves in March 2011 and will be published by the cool geek lovers from WROX, in the same collection as Brad's "Professional WordPress".

Not only this is a super author team, but also we'll be lended a hand by a top notch Technical Editor, an incredible guy who is a bit more active than hyperactive kids drinking coffee on steroids, who blogs, commits, speaks, twitts and never sleeps, also known as Andrew Nacin. His role will be to crack the whip and molest us when we write dumbities and acting like we actually know a thing or two about a thing or two (which should happen more than he hopes)

So far the project is running great and what we have written already is, hmm, let me carefully pick an appropriate word, I'd say, like, awesome.

In the next few months be sure to follow @Brad, @Justin and @me for some cool info and exciting news about the book and how we're doing :)

Oh, and the bad news: I have a fracking sprained index finger on my right hand. Which means I can kiss good bye my 60ish WPM, precisely when I have to write pages as if they were raining. Bleh²x100.

In: , , , On: 2010 / 08 / 29 Short URL: http://ozh.in/tc

There has been one of the funniest && geekiest meme ever on Twitter this week-end: #DeveloperMovies, where people suggested movie titles using code. A lot of fun stuff, some clever stuff, various languages.

Here are a few of the best things I've found and could understand (I did have to Google a few hints sometimes, I feel like I lack a bit of classical movie culture:). Some are duplicate titles with different source code. A few obvious, some quite smart. Can you guess them all?
Read More

WordPress, you use it, you love it, wouldn't it be nice if it would also buy your beers and some more?

Over the recent months, a site that can make you big money has really found its audience, from a clever promising idea to an active community of users. I've already mentioned it when it started, and I mentioning it again now because it is getting big: WP Questions.

If you don't know this site, the theory is dead simple: people ask questions and disclose the little amount of money they're willing to offer, experts answer and hopefully win the cash if their answer gets selected.

Since its debuts, the site has gained real traction and what used to be cheap ass $3 questions are now much more interesting little gigs. Interestingly too, there are now coders who completely offloaded their support to WP Questions, such as Ronalfy with his WordPress and Ajax ebook.

Now, for the catchy headline: over the last week, the total amount of cash offered in questions has surpassed $350, with an average nearing $20 per question, and I suspect the trend is on the rise. Of course, it's uncertain you alone will snatch all the money with best answers each time, but that is a very decent pocket change source.

To catch on, be sure to subscribe to the numerous feeds the site offers, or even better, follow @wpquestions. First answers are usually damn fast (under 3 minutes) but the quickest does not always gives the best answer.

(This post is referral free, I blog about it because I like the service. Yet, if you want to do me a favor, you can still register through me)
(Picture by Andrew Magill)

As a sequel to my previous post about the number of functions across WordPress history, let's talk now about files and sizes.

Through the 54 releases to date, WordPress has grown from an immature toddler to a big healthy kid. The following graph shows the evolution of the zip archive size and the total uncompressed size:

In the early days, in was rather cumbersome to download locally a .zip file, uncompress it, then upload the whole stuff to your server. Now that there is a built-in upgrade, the total size of the baby does not really matter, since everything takes just one click.

What's noteworthy here is that there seem to be a 3 MB limit for the zip to ensure the core upgrade works on most hosts (see issue raised during the making of WP 3.0). So, unless something changes in the way the WordPress upgrader handles new releases, we are nearing the glass ceiling.

You can obviously correlate the total size with the total number of files, and with the evolution of the number of built-in functions (see previous post). Again here, I would have thought the biggest increase would have been with the WP/WPMU merge in 3.0, but it's not. Anyone remember what was so hefty and new in 2.7 and 2.8? The file system? The inclusion of Simplepie to deprecate Magpie?

We're now at almost 9 MB (uncompressed) and 756 files, but what files exactly? The increase of the number of PHP files is pretty stable, while Javascript files population really grew in the recent versions. I think the jump with the 2.8 release again might be the inclusion of both .dev.js uncompressed files and their minified .js version.

To conclude this incredible piece of academic research, a few one liners:

  1. # total size of each wordpress-[version]/ directory
  2. du -s word*
  3.  
  4. # total number of directories
  5. for DIR in word*; do find $DIR -type d | wc -l ; done
  6.  
  7. # total number of .XXX files
  8. for DIR in word*; do find $DIR -type f -name "*XXX" | wc -l ; done

And, for the curious, the complete data.

A few fun and useless facts I collected while mining through 54 WordPress releases, from 0.7.1 to 3.0.1:

  • The latest version of WordPress, 3.0.1 as of publishing, has 3240 PHP functions defined.
  • The first version (0.7.1) had 309
  • Across all WordPress versions, 3920 PHP functions have been defined and used
  • On average, each ".X" release (2.1, 2.9…) introduces 225,2 new functions
  • Only one release went on a diet: version 1.2.1 had 23 functions less than its predecessor, version 1.0.2

Have a look at my Excel mad skillz showing the evolution of the total number of functions defined in WordPress:

The following graphs shows how many functions have been added (ie functions added minus functions removed) in each version.

To my surprise, the biggest evolution has been in WordPress 2.8 ; I would have predicted that the inclusion of multisite functions in 3.0 would have a larger impact.

For the curious and nitpickers: data sheet used.

(If that post sparkled some interest, be sure not to miss A journey through 5 years of WP interface, you'll like it)