90% acf-to-rest-api

Code Review | ACF to REST API

WordPress plugin ACF to REST API scored90%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: 6.3.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

34 reviews

Install metrics

40,000+ active /597,932 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.24ms] Passed 4 tests

Analyzing server-side resources used by ACF to REST API
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.27 ▼3.26
Dashboard /wp-admin3.34 ▲0.0463.38 ▲16.26
Posts /wp-admin/edit.php3.39 ▲0.0352.13 ▲4.64
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.98 ▼3.65
Media Library /wp-admin/upload.php3.26 ▲0.0341.11 ▲3.23

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

ACF to REST API: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7414.45 ▲0.301.80 ▲0.0643.82 ▲0.71
Dashboard /wp-admin2,223 ▲384.85 ▼1.03103.14 ▲1.4542.47 ▲4.22
Posts /wp-admin/edit.php2,109 ▲202.02 ▲0.0336.88 ▼0.2937.05 ▲3.25
Add New Post /wp-admin/post-new.php1,548 ▲2023.08 ▲4.61669.02 ▲6.6854.41 ▲0.99
Media Library /wp-admin/upload.php1,402 ▲114.24 ▲0.05103.28 ▼0.7843.69 ▲1.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: wp-rest-api, rest, json, wordpress, wp-api...

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
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected1,501 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP2324881,249
Markdown1400159
CSS19058
JSON10025
JavaScript10010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods93
▷ Static methods3537.63%
▷ Public methods7378.49%
▷ Protected methods1111.83%
▷ Private methods99.68%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ 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
No PNG images were found in this plugin