WordCamp San Francisco 2013 Recap

This was my second WordCamp San Francisco, and I absolutely loved it. I haven’t attended too much of the sessions, most notably: Mark Jaquith on deploying, code UX by Nikolay Bachiyski, funny theme stories by Ian Stewart, introduction of the O2 theme by Beau Lebens, roles and caps by Andrew Nacin and obviously State of the Word, by Matt Mullenweg, speaking of which, I was named “recent rockstar” for the 3.6 release cycle (along with quite a few other awesome folks), which I’m so proud of.

Continue reading

Expound: A Free Magazine Theme for WordPress

Meet Expound — a free magazine theme for WordPress. Freshly baked, straight out of the oven, filled with _s goodness, a responsive layout, wicked support for featured posts and more!

Expound Magazine Theme for WordPress

Expound was initially built for WP Magazine, a little blog with a big goal to change the perception of WordPress in Russia. It supports up to five featured posts on the home page, post thumbnails, custom excerpts, threaded comments, a sidebar for your widgets, a related posts section built right in, and an awesome responsive layout to keep your readers reading, wherever they are.

You can get Expound from the WordPress.org repository, and don’t hesitate to give a thumbs up if you like it. Enjoy!

Don’t do_shortcode

Shortcodes are pretty cool, and the do_shortcode function is pretty neat as it can parse and execute shortcode callbacks from arbitrary strings, but that function invokes a fairly large regex every time it is called.

That regex looks for all registered shortcodes within a string. For each match, it runs a replacement with a callback function, which also take the time to parse the shortcode attributes, before finally calling the actual callback function that’s been registered with add_shortcode.

Regular expressions are pretty fast in PHP, especially for short strings, but do we really have to have WordPress do all that extra work, when all we really intended was to call our shortcode callback function?

echo do_shortcode( '[foo]' ); // Boo
echo foo_shortcode_callback(); // Yey!

I ran a quick search in the plugins directory, using the following regex:

do_shortcode\(\s*['"]\[

Not the best crafted regex, but it’s supposed to look for calls to do_shortcode followed by a string literal starting with an opening square bracket. Obviously it might get a few false positives for special cases, but it also misses quite a few matches where the shortcode string is put into a variable first.

I found over 600 entries in over 270 plugins, including some of my own. Guilty! So the lesson I learned today is: don’t use do_shortcode when you can use your callback function directly, which is much more efficient.

WordPress Turns 10!

Ten years of WordPress, wow! I started a simple tech blog as a hobby using WordPress 2.6 over five years ago. Today I work on some of the largest WordPress instances in the world, I write plugins and themes, and contribute to WordPress Core. WordPress has changed my life.

I’m co-organizing a WordPress anniversary meetup tonight here in Moscow. We’ll be looking through some of the WordPress releases, and maybe peek into b2. We’ll also talk about translating WordPress themes and plugins into Russian, so come join us if you’re in town.

WordCamp Austin Was a Blast!

WordCamp Austin 2013

Austin has always been on my list of places to visit, and now that I did I know it was totally worth the long travel. Huge WordPress community, very friendly people and a well organized WordCamp, not to mention that wonderful food experience.

I met and chatted with a lot of new folks – developers, designers, bloggers, business owners and beginners eager to use and learn WordPress. It was so overwhelming, in a good way obviously, and the BBQ – so delicious! The unofficial CigarCamp was the perfect way to end the day.

Dev Day on Sunday was a total blast, that’s where all the super geek talk happened over pizza. That’s where I was able to get a few minutes on stage to talk about contributing to WordPress and encouraged people to chime in.

So huge props to everybody who made it happen: organizers and volunteers, speakers, sponsorsattendees, and a very special thanks to the WP Engine folks for hosting Dev Day.

Hope to make it next year!

Don’t Hide the Fact That You’re Using WordPress

There are quite a few blog posts, plugins and hacks suggesting to hide the WordPress version number, or hide the overall fact that you’re using WordPress. Don’t do it — it’s pretty useless.

There are hundreds if not thousands of ways to not only find out the fact that you’re using WordPress, but also find out the exact version number, regardless of any plugins or hacks changing or hiding the “generator” meta tag, the readme file and so on. A great post by my brother Gennady illustrates that.

Security

Most of these “hide my WP” solutions tend to market themselves from a security standpoint, especially with the recent botnet attack on WordPress sites. The truth is that these attacks don’t really care which version of WordPress you’re running. In fact, they don’t even care whether you’re running WordPress at all! How? Well that’s easy, they just take your domain and blindly fire POST requests to a file called wp-login.php, even if you’re running a non-CMS pure HTML website.

The same applies to known theme and plugin vulnerabilities. Go ahead and check your web server’s access logs, there’s a pretty good chance you’ll find requests to timthumb.php even though none of your themes or plugins use the TimThumb library.

So from a security perspective, the secret sauce is to use a strong password, as well as keep your themes, plugins and especially WordPress core up to date. Plugins such as Google Authenticator and Limit Login Attempts can give you that little extra protection.

The Ferrari Analogy

Sometimes people try hide the fact that they’re running WordPress because they’re afraid other humans will spot that and think they’re “unprofessional” or cheap. Well WordPress is the most professional content management system known to human kind, trusted by some of the largest companies worldwide and although free and open source, certainly not cheap.

When you buy yourself a new Ferrari, do you remove the Ferrari logos before showing it to your friends? No. Although if you did, it would still be obvious.

To wrap that up — don’t hide the fact that you’re using WordPress. Use a strong password, keep it updated and drive it with pride. If you bought a premium “hide my WordPress” plugin, you should ask for a refund and buy something useful instead.