Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼5.69ms] Passed 4 tests
A check of server-side resources used by Disable REST API
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.53 ▲0.07 | 42.18 ▼1.90 |
Dashboard /wp-admin | 3.39 ▲0.09 | 50.71 ▼1.87 |
Posts /wp-admin/edit.php | 3.51 ▲0.15 | 49.20 ▼9.21 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 88.74 ▼9.77 |
Media Library /wp-admin/upload.php | 3.32 ▲0.09 | 37.04 ▼0.24 |
Disable REST API /wp-admin/options-general.php?page=disable_rest_api_settings | 4.67 | 38.76 |
Server storage [IO: ▲0.04MB] [DB: ▲0.01MB] 67% from 3 tests
A short overview of filesystem and database impact
Just a few items left to fix
- The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/disable-json-api/" and "wp-content/uploads/"
- (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
disable_rest_api_options |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Disable REST API
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,843 ▲57 | 13.23 ▼1.14 | 2.10 ▲0.13 | 45.92 ▲3.72 |
Dashboard /wp-admin | 2,222 ▲16 | 5.80 ▼0.02 | 99.58 ▼2.91 | 38.76 ▼5.12 |
Posts /wp-admin/edit.php | 2,107 ▲4 | 1.99 ▼0.13 | 33.96 ▼9.27 | 31.86 ▼2.78 |
Add New Post /wp-admin/post-new.php | 1,562 ▲31 | 18.39 ▼4.87 | 649.90 ▲47.00 | 73.08 ▲17.78 |
Media Library /wp-admin/upload.php | 1,395 ▼8 | 4.29 ▲0.07 | 99.59 ▼4.15 | 42.12 ▼2.32 |
Disable REST API /wp-admin/options-general.php?page=disable_rest_api_settings | 1,798 | 2.09 | 24.72 | 48.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 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
Almost there! Just fix the following items
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/disable-json-api/admin.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: admin, api, json, rest, disable...
disable-json-api/disable-json-api.php 92% from 13 tests
The main PHP file in "Disable REST API" ver. 1.8 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)
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
There were no executable files found in this plugin511 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 197 | 247 | 427 |
Markdown | 2 | 19 | 0 | 46 |
JavaScript | 2 | 5 | 0 | 24 |
CSS | 1 | 0 | 0 | 13 |
YAML | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 15.75 |
▷ Minimum class complexity | 8.00 |
▷ Maximum class complexity | 28.00 |
Average method complexity | 2.58 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 34 | |
▷ Static methods | 13 | 38.24% |
▷ Public methods | 23 | 67.65% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 11 | 32.35% |
Functions | 3 | |
▷ Named functions | 1 | 33.33% |
▷ Anonymous functions | 2 | 66.67% |
Constants | 3 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 3 | 100.00% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin