Skip to content


The most popular WordPress actions and filters

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.

Tagged with graphs, wordpress.


3 Responses

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

Continuing the Discussion

  1. Frequently-Used WordPress Filters and Actions · Pressed Words linked to this post on January 19, 2009

    [...] Edward Dale has grepped through the WordPress plugins repository to find the most frequently-used filters and action hooks. [...]

  2. Old But Still Interesting - WordPress Tavern Forum linked to this post on July 13, 2009

    [...] year which shows the most popular actions and filters used in plugins from the plugin repository. http://scompt.com/archives/2009/01/1…ns-and-filters Not sure how the data would look now regarding the number of plugins on the repository but I can [...]

  3. Content ist auch bei den WordPress Filtern der King - Plugins, WordPress, Hooks, Grafiken, Dale, Artikel - WordPress Deutschland Blog linked to this post on September 29, 2010

    [...] haben. Ist dem so, dann schaue die die Grafiken und den zugehörigen Artikel The most popular WordPress actions and filters von Edward Dale [...]