Hookr.io is a brand new project created by Christopher Sanford in the alpha stage of development. It’s an index of all the available WordPress Hooks and API calls stretching back to WordPress 1.5. The site is a result of a pet project he’s been working on for about a year. It started out as a plugin he installed to index his local WordPress projects. Sanford explains why he created the site:
Most reference sites contain only subsets of hooks (if any), and unless the plugin/theme is premium, they usually contain little to no documentation regarding their API. I was tired of the ineffective “find in project” searches within my IDE. So, one day after questioning my productivity and lack of resources for what I needed to do, I started writing the initial parser/indexer as just a locally installed plugin.
The front page features a slider allowing you to switch between versions of WordPress. When one is selected, the site displays how many of the following are in that version.
- Hooks (Action/Filter)
While the total amount of each are correctly displayed, Sandford has limited the results to 250 until it can be determined the site will perform well under load. If the benchmarks are successful, he’ll make the entire index available.
WPSeek performs a similar role as a WordPress search engine for developers. Sanford says the metadata he has indexed sets it apart from other search engines:
I’m storing all the information related to each “object.” For instance, what file and line(s) the function is defined in/on, what are the function parameters, what other objects exist within its source code (hooks, classes, constants etc), the original source, or snippet, both with/without syntax highlighting, documentation blocks, etc. All of this has been generated directly from the source code, not screen-scraped. By having this metadata at my disposal, it makes adding features, or overhauling the layouts extremely simple.
He wants users to see the holistic view of a given topic. For example, showing all classes existing in the admin area related to FTP as shown in the following screenshot. This view helps developers to see the interconnected parts that make up WordPress.
While Hookr.io isn’t easy to use on a mobile device, Sanford says he has, “Already provisioned bootstrap. It’s just a matter of time and necessity to fully implement.” The interface uses a combination of colors and numbers to display relationships between data. The UI is what works for Sanford but he realizes it may not be optimal. The goal was to have a simple and clean layout but he’s looking for UI/UX advice.
If developers are going to use Hookr.io, the content has to be accurate. According to Sanford, “90% of the development time was consumed with ensuring the accuracy of the parser.” He admits it’s not perfect but is accurate enough to develop against. Since WordPress is updated far less frequently than plugins and themes, the content is updated in an ad-hoc fashion. If the site becomes a useful tool for developers, he plans on automating the manual processes for near real-time updates.
Your Feedback and Ideas Are Needed
Based on the feedback and whether or not developers find the site useful will determine whether Sanford devotes more time to the project. He already has a lot of ideas in mind to make it a true resource for WordPress developers, regardless of skill level. One of the features Hookr.io supports but is not available to the public is the inclusion of plugin and theme data. The content has been indexed but it’s about three million records. A lot of benchmarking and fine-tuning will take place before the data is added to the search engine.
Sanford is looking for feedback on all facets of the site. Whether it’s design, implementation, or accuracy of data, please share it in the comments. He’ll be watching the conversation closely and will answer any questions you have.