100% acf-to-rest-api

Code Review | ACF to REST API

WordPress plugin ACF to REST API scored 100% from 54 tests.

About plugin

  • Plugin page: acf-to-rest-api
  • Plugin version: 3.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.1
  • WordPress version: 5.8.1
  • First release: Jan 4, 2016
  • Latest release: Mar 6, 2022
  • Number of updates: 42
  • Update frequency: every 53.6 days
  • Top authors: airesvsg (100%)

Code review

54 tests

User reviews

31 reviews

Install metrics

40,000+ active / 394,569 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼147.80ms] Passed 4 tests

Analyzing server-side resources used by ACF to REST API
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0124.53 ▲2.10
Dashboard /wp-admin3.07 ▲0.0033.20 ▼2.92
Posts /wp-admin/edit.php3.16 ▲0.0430.42 ▼3.70
Add New Post /wp-admin/post-new.php5.43 ▼0.0177.24 ▼585.33
Media Library /wp-admin/upload.php3.01 ▲0.0123.25 ▲0.76

Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for ACF to REST API
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,693 ▲4115.57 ▼0.074.89 ▼0.6875.97 ▼1.76
Dashboard /wp-admin2,956 ▲576.12 ▼0.04114.83 ▼40.61168.21 ▼19.28
Posts /wp-admin/edit.php2,772 ▲323.23 ▼0.1363.97 ▼3.00137.89 ▼9.26
Add New Post /wp-admin/post-new.php3,713 ▼3018.61 ▼0.50407.94 ▼20.86155.95 ▼19.57
Media Library /wp-admin/upload.php1,779 ▲275.49 ▼0.02144.80 ▼6.27187.00 ▲1.92

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: rest, json, api, wp-rest-api, acf...

acf-to-rest-api/class-acf-to-rest-api.php 92% from 13 tests

Analyzing the main PHP file in "ACF to REST API" version 3.3.3
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("acf-to-rest-api.php" instead of "class-acf-to-rest-api.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,501 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity13.44
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
▷ Static methods3537.63%
▷ Public methods7378.49%
▷ Protected methods1111.83%
▷ Private methods99.68%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin