Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼1.96MB] [CPU: ▼56.24ms] Passed 4 tests
This is a short check of server-side resources used by Advanced Custom Routes - Custom Endpoints for WP REST API
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.44 | 5.13 ▼40.97 |
Dashboard /wp-admin | 2.05 ▼1.26 | 5.64 ▼46.07 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 8.08 ▼41.77 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 5.94 ▼96.16 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 6.44 ▼31.20 |
Settings /wp-admin/edit.php?post_type=cd-custom-rest-api&page=wp-rest-endpoints-settings | 2.05 | 6.64 |
Custom Routes /wp-admin/edit.php?post_type=cd-custom-rest-api | 2.05 | 5.71 |
Server storage [IO: ▲0.74MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 300 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
A check of browser resources used by Advanced Custom Routes - Custom Endpoints for WP REST API
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,835 ▲74 | 13.19 ▼1.19 | 4.65 ▲2.84 | 41.94 ▲0.09 |
Dashboard /wp-admin | 2,226 ▲49 | 5.84 ▲0.18 | 96.13 ▲5.28 | 51.72 ▲4.69 |
Posts /wp-admin/edit.php | 2,137 ▲37 | 2.29 ▲0.33 | 39.77 ▲1.33 | 46.78 ▲10.48 |
Add New Post /wp-admin/post-new.php | 1,556 ▲28 | 23.53 ▲0.53 | 681.04 ▲68.42 | 65.24 ▲13.32 |
Media Library /wp-admin/upload.php | 1,434 ▲31 | 4.42 ▲0.22 | 102.07 ▲4.24 | 54.69 ▲10.74 |
Settings /wp-admin/edit.php?post_type=cd-custom-rest-api&page=wp-rest-endpoints-settings | 869 | 1.81 | 26.85 | 34.89 |
Custom Routes /wp-admin/edit.php?post_type=cd-custom-rest-api | 1,106 | 2.25 | 32.40 | 41.14 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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+5905
Function 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.)
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- theysaidso_admin_options
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)
These server-side errors were triggered
- 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+5905
Function 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+5905
Function 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+5905
Function 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+5905
Function 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
- 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/date/date-after.php:8
- > 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 maybe_unserialize() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/tags/tag-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/route-endpoint/route-endpoint.php:15
- > 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
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-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 esc_attr() in wp-content/plugins/advanced-custom-routes-custom-endpoints-for-wp-rest-api/admin/query-builder/query-builder-options/date/date-before.php:8
- > 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/status/status.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/settings.php:4
- > 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 issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Requires at least: Version format is invalid
- Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
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
It is important to fix the following:
- Main file name: It is recommended to name the main PHP file 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 | A short check of programming languages and file extensions; no executable files are allowed
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 short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
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
PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.20MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 74.87KB | 22.15KB | ▼ 70.41% |
assets/banner-1544x500.png | 17.30KB | 11.44KB | ▼ 33.85% |
assets/banner-772x250.png | 12.54KB | 8.07KB | ▼ 35.62% |
assets/screenshot-2.png | 45.44KB | 11.94KB | ▼ 73.73% |
assets/screenshot-4.png | 21.48KB | 7.23KB | ▼ 66.33% |