Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors
Server metrics [RAM: ▼2.33MB] [CPU: ▼360.98ms] Passed 4 tests
Server-side resources used by Advanced Custom Routes - Custom Endpoints for WP REST API
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.04 ▼1.48 | 6.75 ▼44.83 |
Dashboard /wp-admin | 2.05 ▼1.35 | 4.67 ▼29.25 |
Posts /wp-admin/edit.php | 2.05 ▼1.58 | 4.63 ▼33.12 |
Add New Post /wp-admin/post-new.php | 2.05 ▼4.92 | 5.95 ▼1,336.71 |
Media Library /wp-admin/upload.php | 2.05 ▼1.24 | 4.90 ▼21.00 |
Settings /wp-admin/edit.php?post_type=cd-custom-rest-api&page=wp-rest-endpoints-settings | 2.06 | 6.58 |
Custom Routes /wp-admin/edit.php?post_type=cd-custom-rest-api | 2.06 | 4.94 |
Server storage [IO: ▲0.74MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 300 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Advanced Custom Routes - Custom Endpoints for WP REST API
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,840 ▲86 | 16.09 ▲0.10 | 6.57 ▲0.14 | 2.39 ▲0.14 |
Dashboard /wp-admin | 2,934 ▲76 | 6.41 ▲0.32 | 119.33 ▼17.56 | 149.76 ▼17.20 |
Posts /wp-admin/edit.php | 2,730 ▲36 | 3.27 ▲0.04 | 68.62 ▲1.45 | 140.84 ▼3.70 |
Add New Post /wp-admin/post-new.php | 1,691 ▼67 | 15.69 ▼5.67 | 427.23 ▼39.78 | 188.46 ▲20.15 |
Media Library /wp-admin/upload.php | 1,742 ▲41 | 5.70 ▲0.19 | 164.35 ▲23.95 | 190.75 ▼6.99 |
Settings /wp-admin/edit.php?post_type=cd-custom-rest-api&page=wp-rest-endpoints-settings | 1,074 | 2.81 | 57.90 | 106.06 |
Custom Routes /wp-admin/edit.php?post_type=cd-custom-rest-api | 1,415 | 3.20 | 64.44 | 122.07 |
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
These items require your attention
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5768
wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the select2_styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=cd-custom-rest-api
- > POST request to /wp-admin/admin-ajax.php
- > User notice in wp-includes/functions.php+5768
wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the select2_styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=cd-custom-rest-api
- > POST request to /wp-admin/admin-ajax.php
- > User notice in wp-includes/functions.php+5768
wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the select2_styles handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=cd-custom-rest-api
- > POST request to /wp-admin/admin-ajax.php
- > User notice in wp-includes/functions.php+5768
wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the select2_scripts handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=cd-custom-rest-api
- > POST request to /wp-admin/admin-ajax.php
- > User notice in wp-includes/functions.php+5768
wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the select2_scripts handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
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
Please take a closer look at the following
- 26× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/post-parent/post-parent-exclude.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/response-output/response-output.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/post-ids/post-id-include.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/categories/category-exclude.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/authors/author-include.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/authors/author-exclude.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/route-endpoint/route-endpoint.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/post-types/post-type.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/register-custom-post-type.php:48
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
- Requires at least: Invalid plugin version format
- Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
advanced-custom-routes-custom-endpoints-for-wp-rest-api/index.php 92% from 13 tests
The primary PHP file in "Advanced Custom Routes - Custom Endpoints for WP REST API" version 0.8.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("advanced-custom-routes-custom-endpoints-for-wp-rest-api.php" instead of "index.php")
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
Good job! No executable or dangerous file extensions detected4,169 lines of code in 38 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 7 | 0 | 0 | 2,279 |
PHP | 26 | 468 | 156 | 1,262 |
JavaScript | 3 | 108 | 65 | 379 |
CSS | 2 | 135 | 7 | 249 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 18 | |
▷ Named functions | 16 | 88.89% |
▷ Anonymous functions | 2 | 11.11% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.20MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-256x256.png | 5.70KB | 2.94KB | ▼ 48.42% |
assets/screenshot-2.png | 45.44KB | 11.94KB | ▼ 73.73% |
assets/banner-1544x500.png | 17.30KB | 11.44KB | ▼ 33.85% |
assets/screenshot-4.png | 21.48KB | 7.23KB | ▼ 66.33% |
assets/banner-772x250.png | 12.54KB | 8.07KB | ▼ 35.62% |