WordPress has an amazing plugin system that has allowed thousands of plugins to be created. At the heart of the plugin system are actions and filters that allow developers to hook into the WordPress internals and tweak things. There are hundreds of actions and filters, many of which are described on the codex, and developers can create their own as well. I was curious which ones were most used by plugin developers so I parsed the WordPress plugin database and ended up with the graphs and analysis below.
Top 20 WordPress actions
As is clear from the graph, the most popular WordPress action is admin_menu. This makes sense, as one of the first things a plugin developer might want to do is have their plugin show up in the WordPress backend. Not surprisingly, many of the other top 20 actions are used just to get the plugin up and running: init, plugins_loaded, activate_, deactivate_, etc. The other well-represented group of actions are those dealing with the post life-cycle: save_post,publish_post, edit_post, delete_post.
In total, there were 659 unique actions used 12373 times. The graph above represents about 72% of the actions.
Top 20 WordPress filters
The shape of the top 20 filters graph is a bit different. the_content is the clear favorite of plugin developers, along with a couple other content filters: the_excerpt, the_content_rss, the_excerpt_rss. The query filters are also well-represented: posts_where, query_vars, wp, posts_join. The filter graph drops off pretty quickly so that most of the filters are used a maximum of 20 times.
In total, there were 512 unique filters used 5071 times. The above graph represents about 55% of the filters.
Method
I’ll post more about my method in the future. The numbers and graphs should be current as of SVN revision #85627 on 1/10/2009. A number of errors were encountered along the way and some corners were cut, so the numbers aren’t perfect.

3 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Continuing the Discussion