90% rest-api-helper

Code Review | REST API Helper

WordPress plugin REST API Helper scored90%from 54 tests.

About plugin

  • Plugin page: rest-api-helper
  • Plugin version: 2.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3
  • WordPress version: 6.3.1
  • First release: Aug 19, 2016
  • Latest release: Jan 2, 2022
  • Number of updates: 70
  • Update frequency: every 28.0 days
  • Top authors: JasmanXcrew (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /20,361 total downloads

Benchmarks

Plugin footprint 83% from 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.30MB] [CPU: ▼16.09ms] Passed 4 tests

Server-side resources used by REST API Helper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.27 ▲0.49
Dashboard /wp-admin3.33 ▲0.0347.99 ▼3.49
Posts /wp-admin/edit.php3.38 ▲0.0351.79 ▼1.57
Add New Post /wp-admin/post-new.php4.62 ▼1.2647.11 ▼59.79
Media Library /wp-admin/upload.php3.26 ▲0.0337.72 ▲2.13
REST API Helper Option /wp-admin/options-general.php?page=imh_settings3.2231.22

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
imh_post_type
imh_update_notice
imh_error_notice
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for REST API Helper
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.62 ▲0.441.84 ▲0.0740.25 ▼0.02
Dashboard /wp-admin2,193 ▲125.67 ▼0.0790.45 ▼14.7839.52 ▼4.71
Posts /wp-admin/edit.php2,104 ▲42.06 ▲0.0040.28 ▲5.2338.03 ▲3.47
Add New Post /wp-admin/post-new.php1,548 ▲223.30 ▼0.13666.49 ▲0.5456.58 ▼2.55
Media Library /wp-admin/upload.php1,407 ▲74.23 ▼0.01101.20 ▼5.4844.81 ▼3.14
REST API Helper Option /wp-admin/options-general.php?page=imh_settings8062.0524.3625.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • imh_update_notice
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • imh_error_notice
    • imh_post_type
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

rest-api-helper/rest-api-helper.php Passed 13 tests

This is the main PHP file of "REST API Helper" version 2.2.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
136 characters long description:
This plugin help REST API for display featured media source, author, categories, and custom fields. This plugin is made for Mobile Apps.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,264 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12582931,219
PO File1142044
HTML1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity140.00
▷ Minimum class complexity140.00
▷ Maximum class complexity140.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods36
▷ Static methods00.00%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants18
▷ Global constants18100.00%
▷ Class constants00.00%
▷ Public constants00.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 are no PNG files in this plugin