84% advanced-wp-rest-api

Code Review | Advanced WP REST API

WordPress plugin Advanced WP REST API scored84%from 54 tests.

About plugin

  • Plugin page: advanced-wp-rest-api
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Dec 28, 2022
  • Latest release: Dec 28, 2022
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: galaxyweblinks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /187 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼1.91ms] Passed 4 tests

An overview of server-side resources used by Advanced WP REST API
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.01 ▲0.79
Dashboard /wp-admin3.36 ▲0.0543.47 ▼2.80
Posts /wp-admin/edit.php3.41 ▲0.0543.09 ▼1.97
Add New Post /wp-admin/post-new.php5.94 ▲0.0589.79 ▼3.67
Media Library /wp-admin/upload.php3.28 ▲0.0537.08 ▲4.96
Advanced WP REST API /wp-admin/options-general.php?page=awpr_settings3.2536.79

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced WP REST API
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.23 ▼0.121.68 ▲0.0246.86 ▲7.11
Dashboard /wp-admin2,201 ▲205.64 ▼0.0283.70 ▼13.8835.34 ▼4.92
Posts /wp-admin/edit.php2,106 ▲92.01 ▲0.0233.82 ▼2.1738.50 ▲3.57
Add New Post /wp-admin/post-new.php1,541 ▲1318.10 ▼5.19592.33 ▼108.7166.19 ▲11.95
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0096.04 ▼10.0140.61 ▼4.20
Advanced WP REST API /wp-admin/options-general.php?page=awpr_settings8422.0023.4829.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-wp-rest-api/apis/class-gwl-register-route-api.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-wp-rest-api/apis/class-gwl-register-route-api.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (backend-settings.png) image not found
The official readme.txt is a good inspiration

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

The entry point to "Advanced WP REST API" version 1.0.0 is a PHP file that has certain tags in its header comment area
48 characters long description:
This plugin register multiple REST API endpoints

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected320 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP24381311
CSS1019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity5.83
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.16MB with 0.12MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
backend-settings.png80.96KB20.60KB▼ 74.55%
screenshot-1.png80.96KB20.60KB▼ 74.55%