Because you make things with WordPress

Share

Kurt Payne Interview

img-template

Kurt Payne, (@k_payne) author of the P3 Plugin, is in a long-term love affair with PHP. By day, he’s a PHP developer assisting WordPress users on GoDaddy. In his spare time, he contributes to WordPress Core and shares his knowledge by speaking at WordCamps.

Tell us the story of how you got into working with WordPress. What itch did it scratch for you and what itch does it scratch for you today?

I’ve been a PHP zealot for over a decade. I’ve worked at GoDaddy since 2007, mostly on internal hosting support projects. I first met WordPress from a support standpoint. Later, our company got a WordPress-powered tech blog and a BuddyPress-powered internal blog, too.

Today, I still know WordPress primarily from a support standpoint. I care deeply about the quality and stability of WordPress as a platform because GoDaddy supports millions of WordPress websites. Knowing how to interact with the community, use Core, and write plugins puts me in a much better position to support our customers.

How did you fall in love with PHP?

When I was in college, there was a brand new class called Databases on the Web that was taught with Perl, PHP, and Java, and backed by MySQL. PHP (version 4.1) was the easiest to use, by far. The class was amazing because of the teacher, but PHP was the tool I wielded the best. Since then, I really haven’t had to switch away from it. With all the libraries and PECL packages available for PHP, there’s not much it can’t do.

You’ve got two plugins to your credit: WP DB Driver and Upload Scanner. What motivated you to create your plugins and what was the most important thing you learned from creating them?

WP DB Driver is a collaboration between me and Marko Heijnen. It started as a patch for trac ticket 21663, but the Core group needed a better way to test it. Marko had the idea to port it to a plugin (à la MP6) to reach a wider audience and make iterative development easier. We set up a GitHub repo to collaborate, and push the plugin to WordPress when a release is ready.

Upload Scanner was an experiment. So far, it hasn’t really taken off. The original idea was that you could hook a virus scanner (like clamav) whenever a file was uploaded, through any means. Since the plugin was merely a bridge between the scanner application and WordPress, the scanner could be any application — even one you write yourself. I think this hasn’t caught on because it doesn’t ship with a malware scanner configured by default.

I do have a third plugin, but it’s released under GoDaddy’s name. I’m the main author on P3 (Plugin Performance Profiler). The inspiration behind this plugin came from GoDaddy’s own hosting users. They installed plugins to make their site look / perform like they wanted, but they weren’t aware of the performance impact that these plugins had and what stacking them up can do. We designed P3 specifically to not make recommendations, but to just give some transparency to what’s going on. We want users to be empowered to make their own decisions regarding features vs. performance.

In 2012, you spoke at WCSF 2012 about the hallmarks of fast plugins. What are the top three tips you can share on how to make plugins perform more effectively?

The first thing that every developer and user should understand is that there is a trade-off between performance and features. For WordPress, this could mean a few more database calls, some network overhead, a little extra RAM usage, some more CPU cycles, or not using cached data. For the browser, this might mean a little larger webpage, or a little slower JavaScript, or some extra images, or additional requests.

Coming from that understanding, the top three habits I can recommend are:

1.) Reduce I/O. Don’t go to the database, disk, or network unless you have to. When you have to perform an I/O operation, try to cache the results if possible.

2.) Write lazy code. Only hook the actions / filters you need. Only include/require the files you need when you need them. This will reduce the amount of memory it takes to load your plugin into memory and can reduce WordPress’ run time because it’s not doing extra work.

3.) Use Core. There is a lot of developer candy in core. They have all sorts of file system abstractions, an http wrapper, two caching layers, (object cache, and transients), security features like kses, nonces, and a full-featured action/filter system. There is even an endpoint for Ajax requests (admin-ajax.php) and post requests (admin-post.php). There’s a bunch of other stuff, too. Look around really well, and ask on Twitter or on the wp-hackers list before you create any new abstraction that’s not in Core.

You’re a WordPress Core contributor. Tell us the story of how you became a Core contributor. What are you most proud of having contributed to WordPress? What advice would you give to emerging volunteers on getting involved contributing to WordPress?

By far, the most popular app on GoDaddy’s hosting environment is WordPress. They wanted to have a Core contributor and subject matter expert to give back to the community and to make the WordPress experience at GoDaddy the best it can be. This was one of the company’s first open source initiatives.

I took full advantage of the opportunity to learn about WordPress, plugins, themes, the community, and to attend some WordCamps. I ended up being the lead developer on P3, which has been very helpful to our support staff, and has been pretty popular with its users, too. I really found a niche, too, with writing unit tests. The unit tests were pretty broken in WordPress 3.3.

I’m most proud of being part of the team who got the unit tests back in shape, and contributing some big chunks to those tests. The ability to quickly test WordPress and measure what has and has not been tested is critical to the stability of the platform.

I would suggest new contributors use all of the community resources available for learning about WordPress. There are the make blogs, the irc chatrooms, the mailing lists, the Codex, queryposts.com, WordPress.tv, and plenty of free articles / tutorials you can find by following the right Twitter accounts. Hint: look for WordCamp hashtags like #wcsf and find interesting people / tweets. That’s a great way to start building your list of people to follow. These are all free! If you have $20 and a weekend, go to a WordCamp and start meeting people. The next step is to just participate in trac by following tickets, participating in the conversation, and adding patches.

What do you most enjoy about helping to support WordPress users through your work with GoDaddy?

I really enjoy interacting with customers directly. These interactions are where I learn the most about WordPress in a practical sense — how users are using WordPress, the problems they’re facing, what their workflow is, why they do the things they do. In the end, I feel like I’ve helped someone be heard online, or be successful in their business.

A lot of my support experience has been focused on performance. People really get excited when you show them one small tweak that makes their site load faster. I love to see customers learn how to use tools like P3, WebPageTest, and Pingdom Tools, too, to understand their site’s performance and how it’s impacted by the decisions they make when picking a theme or plugin.

Author

Krista Stevens

I'm a runner, reader, writer, and editor.

Submit your own resource