78% rest-manager

Code Review | Rest Manager

WordPress plugin Rest Manager scored78%from 54 tests.

About plugin

  • Plugin page: rest-manager
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6.31+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.5
  • WordPress version: 6.3.1
  • First release: Nov 20, 2017
  • Latest release: Jun 2, 2018
  • Number of updates: 17
  • Update frequency: every 11.4 days
  • Top authors: redcastor (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,306 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.30MB] [CPU: ▲5.08ms] Passed 4 tests

A check of server-side resources used by Rest Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.39 ▲3.75
Dashboard /wp-admin5.41 ▲2.1149.92 ▲5.92
Posts /wp-admin/edit.php5.52 ▲2.1750.10 ▲5.95
Add New Post /wp-admin/post-new.php6.81 ▲0.9383.90 ▲6.13
Media Library /wp-admin/upload.php5.33 ▲2.1038.00 ▲4.71
Rest Manager /wp-admin/options-general.php?page=settings_rest-manager5.3043.02

Server storage [IO: ▲0.26MB] [DB: ▲0.92MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Just a few items left to fix
  • You have illegally modified 1 file (7.33KB) outside of "wp-content/plugins/rest-manager/" and "wp-content/uploads/"
    • (new file) wp-content/mu-plugins/rest-manager-request.php
Filesystem: 45 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
rest-manager_version
rest-manager_routes
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Rest Manager
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.23 ▼1.121.89 ▲0.2241.54 ▲0.06
Dashboard /wp-admin2,204 ▲125.83 ▲0.87106.71 ▲2.5037.94 ▼2.38
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0639.01 ▲4.9834.29 ▲0.84
Add New Post /wp-admin/post-new.php1,536 ▲823.28 ▼0.27677.38 ▲67.5660.97 ▲14.22
Media Library /wp-admin/upload.php1,395 ▲44.20 ▼0.0497.11 ▲0.9441.06 ▼2.73
Rest Manager /wp-admin/options-general.php?page=settings_rest-manager8,3024.97162.7341.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 22898 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=settings_rest-manager
    • > Notice in wp-content/plugins/rest-manager/includes/class-rest-manager-settings.php+1501
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/rest-manager/lib/rest-manager-request.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: wp-json, rest, rest-manager, resp-api, manager...

rest-manager/rest-manager.php Passed 13 tests

The primary PHP file in "Rest Manager" version 1.0.7 is used by WordPress to initiate all plugin functionality
84 characters long description:
Manage the all rest API route. diasble or filter plugins loaded on request rest api.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,532 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP177221,1891,600
CSS1899526
JavaScript437123210
JSON400100
Markdown321055
Sass111741

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity23.83
▷ Minimum class complexity1.00
▷ Maximum class complexity225.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods101
▷ Static methods76.93%
▷ Public methods8988.12%
▷ Protected methods00.00%
▷ Private methods1211.88%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/dist/images/switch.png3.01KB0.64KB▼ 78.70%
admin/dist/images/chosen-sprite.png0.53KB0.88KB0.00%
admin/dist/images/chosen-sprite@2x.png0.72KB0.83KB0.00%