During yesterday’s pivotal WP REST API meeting, WordPress contributors discussed adoption of the API. A cursory search of the WordPress.org plugin directory shows that fewer than two dozen plugins are currently using the API scaffolding included in WordPress 4.4. For reference, here are the 20 plugins identified by Mika Epstein during the meeting, along with active installation numbers for each:
- ACF to REST API – 200+
- ACF to WP-API – 1,000+
- ACF to WP REST API – 300+
- Custom Contact Forms – 70,000+
- Dashboard Directory Size – 100+
- Invitations for Slack – less than 10
- JWT Authentication for WP REST API – 100+
- oEmbed API – no longer available as of 2/5/2016
- Prayers – less than 10
- WP REST API – 9,000+
- REST JSON – less than 10
- REST Routes – less than 10
- SearchWP API – 20+
- Maps by Storelocator Plus – 10,000+
- Tabulate – 100+
- WP API Categories + Tags – 10+
- WP API Menus – 700+
- WP REST API Log – 100+
- WP REST API Sidebars – less than 10
- WPRestApiExtensions – less than 10
With a few notable exceptions, most of these plugins are hovering around a range of 10 – 100 active installs. These low numbers may indicate that plugin authors have not yet readily embraced building with the scaffolding that was merged into core in 4.4. However, some developers who have embraced building with the API have opted not to offer their plugins and themes for large scale distribution on WordPress.org.
Taylor Lovett, author of Custom Contact Forms, believes that it’s important to get REST API-powered plugins into the hands of users, despite the support challenges of public distribution.
Custom Contact Forms is currently the most widely-used plugin running the WP REST API with more than 70,000 installations, but the journey to using the current version has been fraught with challenges.
“There have been a number of backwards compatibility breaks with the JSON REST API project,” Lovett said. “If I had known going into it what would happen, I probably would have not used the API.
“I am still not completely comfortable with using the API because of the perceived instability of the project,” he said.”
Nevertheless, public distribution has brought Lovett considerable feedback from users which has been invaluable for his contributions to the REST API project.
“I’ve had a number of patches to the API that were discovered through Custom Contact Forms,” he said. “I’ve discovered some real edge cases while maintaining the API across more than 70K installations.”
Distributing his plugin on WordPress.org while the API went through significant changes was more challenging than Lovett anticipated, but through it the API has gained more exposure.
“The faster the API is exposed to people and people get comfortable using it, the sooner we will see some major strides in applications being built around WordPress,” he said.
We are building Postmatic 2 to leverage the REST api (for delivering comments from email), but it degrades to use admin-ajax if REST fails or is unavailable.
It’s a hoop to jump through, but by taking a progressive approach we get plenty of flexibility and immediate gains. I look forward to the day that the install base for REST is strong enough that we can use it 100% of the time.
Epoch 2 (for displaying and publishing comments from the web) is built completely on, and will require, REST. There is no looking back when it comes to loading comments via REST and displaying them with Angular. It’s fantastic.