Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.74MB] [CPU: ▼1.19ms] Passed 4 tests
Server-side resources used by WP-Restify
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.34 ▲0.88 | 45.11 ▲5.11 |
Dashboard /wp-admin | 4.05 ▲0.75 | 52.37 ▲4.48 |
Posts /wp-admin/edit.php | 4.10 ▲0.74 | 47.63 ▼1.62 |
Add New Post /wp-admin/post-new.php | 6.63 ▲0.74 | 86.50 ▼12.74 |
Media Library /wp-admin/upload.php | 3.97 ▲0.74 | 40.55 ▲5.77 |
Server storage [IO: ▲0.28MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
widget_theysaidso_widget |
json_api_plugin_version |
Browser metrics Passed 4 tests
Checking browser requirements for WP-Restify
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,802 ▲67 | 14.60 ▲0.22 | 1.88 ▼0.03 | 42.81 ▲2.53 |
Dashboard /wp-admin | 2,206 ▲21 | 4.87 ▼0.17 | 111.80 ▲9.05 | 45.45 ▲4.63 |
Posts /wp-admin/edit.php | 2,089 ▲3 | 2.05 ▲0.05 | 34.92 ▼1.90 | 33.42 ▲3.03 |
Add New Post /wp-admin/post-new.php | 1,519 ▼23 | 23.12 ▼0.20 | 676.72 ▼8.93 | 63.15 ▲8.49 |
Media Library /wp-admin/upload.php | 1,388 ▼3 | 4.20 ▼0.01 | 100.27 ▼2.17 | 42.53 ▼2.82 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
- 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
include_once(ABSPATHWPINC/class-wp-json-server.php): failed to open stream: No such file or directory in wp-content/plugins/rest-json/include/wp-json.php on line 29
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-json/include/class-wp-json-server.php on line 10
- > PHP Warning
include_once(ABSPATHWPINC/class-wp-xmlrpc-server.php): failed to open stream: No such file or directory in wp-content/plugins/rest-json/include/wp-json.php on line 27
- > PHP Fatal error
Uncaught Error: Class 'WP_JSON_Posts' not found in wp-content/plugins/rest-json/include/class-wp-json-media.php:3
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/admin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/rest-json/include/wp-json.php on line 26
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-json/include/wp-json.php on line 27
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-json/include/wp-json.php on line 29
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/admin.php' (include_path='.:/usr/share/php') in wp-content/plugins/rest-json/include/class-wp-json-server.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/rest-json/include/wp-json.php:32
- > PHP Warning
Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/rest-json/include/wp-json.php on line 28
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
No tags were found
rest-json/plugin.php 92% from 13 tests
The main PHP file in "WP-Restify" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rest-json.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin3,890 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 1,025 | 2,013 | 3,207 |
JavaScript | 1 | 141 | 265 | 581 |
HTML | 3 | 35 | 0 | 102 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 30.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 127.00 |
Average method complexity | 4.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 52.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 14 | |
▷ Abstract classes | 2 | 14.29% |
▷ Concrete classes | 12 | 85.71% |
▷ Final classes | 0 | 0.00% |
Methods | 168 | |
▷ Static methods | 6 | 3.57% |
▷ Public methods | 130 | 77.38% |
▷ Protected methods | 36 | 21.43% |
▷ Private methods | 2 | 1.19% |
Functions | 31 | |
▷ Named functions | 29 | 93.55% |
▷ Anonymous functions | 2 | 6.45% |
Constants | 19 | |
▷ Global constants | 6 | 31.58% |
▷ Class constants | 13 | 68.42% |
▷ Public constants | 13 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected