Welcome to the first in a series of posts reflecting on the experiences around the first patch that a contributor wrote or had committed to the WordPress core. I thought I would start the ball rolling with myself and I hope to draw some other people in for future posts in this series.
I can just about remember what drove me to get involved and write one of my first patches for the core of WordPress just over 5 years ago. I had run WordPress for about a year and a half and started to get a little obsessed with the number of database queries that were required to produce the front page of the site as they were slowing it down. It seemed to me that there were an a lot more queries that should be needed to output a list of 5 posts and the meta data associated with them.
It turned out, when I dug into what the queries were for, that most of them were related to the different options that were added by all the plugins I had loaded my site up with. I found that there was a subtle performance issue in the way most plugins used
update_option(). Basically every time a plugin called
add_option() WordPress would check to see if the option already existed and only add if it didn't. This seemed sensible except that for every option that was marked for "auto loading". For these WordPress already knew they existed as it caches all the "auto load" options with a single query early on.
As can be seen from the ticket it took a little while before Ryan had time to review and commit the patch - It also turns out fellow lead developer Mark also had a hand in updating the patch when it went stale.
It really great to look back and reflect on "my first patch". I had a great experience at the time. It was really nice to have a friendly community which nurtured me as I developed in my knowledge of WordPress and contributing to an open-source project.
Please let me know if you would like to share your experiences writing your first patch for the core of WordPress.