90% wp-rest-api-helper

Code Review | WP REST API Helper

WordPress plugin WP REST API Helper scored90%from 54 tests.

About plugin

  • Plugin page: wp-rest-api-helper
  • Plugin version: 2.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.7
  • WordPress version: 6.3.1
  • First release: Mar 29, 2020
  • Latest release: Mar 14, 2021
  • Number of updates: 11
  • Update frequency: every 32.2 days
  • Top authors: rabiulislamrobi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.17MB] [CPU: ▼5.95ms] Passed 4 tests

Server-side resources used by WP REST API Helper
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2037.98 ▼5.31
Dashboard /wp-admin3.52 ▲0.1747.05 ▼20.46
Posts /wp-admin/edit.php3.57 ▲0.2154.57 ▲7.11
Add New Post /wp-admin/post-new.php6.05 ▲0.1696.25 ▼1.00
Media Library /wp-admin/upload.php3.38 ▲0.1537.29 ▲2.96

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
wprah_plugin_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP REST API Helper
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.19 ▼1.191.54 ▼0.2040.62 ▼2.70
Dashboard /wp-admin2,209 ▲245.88 ▲0.03107.89 ▲2.2843.45 ▲2.28
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0739.92 ▲3.7435.09 ▼1.33
Add New Post /wp-admin/post-new.php1,514 ▼1917.67 ▼5.45620.06 ▼72.0647.60 ▼17.20
Media Library /wp-admin/upload.php1,382 ▼94.26 ▲0.0892.96 ▼6.7340.92 ▼5.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • wprah_plugin_version
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The SRP test was a success

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: rest, api, rest api

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

Analyzing the main PHP file in "WP REST API Helper" version 2.0.2
32 characters long description:
A plugin to help out WP Rest API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin900 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP21185366882
JSON20018

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity5.82
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes15.88%
Methods67
▷ Static methods45.97%
▷ Public methods6597.01%
▷ Protected methods00.00%
▷ Private methods22.99%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/placeholder.png0.38KB0.13KB▼ 66.07%