Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼3.06ms] Passed 4 tests
Server-side resources used by Rest API Cache
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 40.31 ▼1.19 |
Dashboard /wp-admin | 3.33 ▲0.03 | 45.50 ▼8.08 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 45.27 ▼0.52 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.06 | 86.01 ▼2.07 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 33.82 ▼0.88 |
Rest API Cache /wp-admin/admin.php?page=rest_api_cache_setting | 3.28 | 32.21 |
Exclude API Cache /wp-admin/admin.php?page=rest_api_exclude | 3.28 | 32.16 |
Server storage [IO: ▲0.34MB] [DB: ▲0.33MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 8 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
rest_cache_time |
rest_cache_datetime |
widget_recent-comments |
db_upgraded |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Rest API Cache
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,941 ▲206 | 13.58 ▼0.71 | 8.45 ▲6.65 | 43.79 ▼3.21 |
Dashboard /wp-admin | 2,250 ▲59 | 5.80 ▼0.11 | 105.98 ▼8.32 | 38.52 ▼3.87 |
Posts /wp-admin/edit.php | 2,139 ▲47 | 2.02 ▲0.01 | 39.00 ▲4.54 | 33.85 ▲0.70 |
Add New Post /wp-admin/post-new.php | 1,574 ▲60 | 23.28 ▲5.74 | 668.57 ▼10.20 | 55.59 ▲3.97 |
Media Library /wp-admin/upload.php | 1,435 ▲44 | 4.22 ▼0.10 | 92.83 ▼0.90 | 40.81 ▼0.07 |
Rest API Cache /wp-admin/admin.php?page=rest_api_cache_setting | 890 | 1.68 | 24.81 | 29.80 |
Exclude API Cache /wp-admin/admin.php?page=rest_api_exclude | 826 | 1.84 | 24.30 | 26.15 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.33MB] 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: 8 options
- widget_theysaidso_widget
- widget_recent-posts
- rest_cache_time
- rest_cache_datetime
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- can_compress_scripts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=rest_api_exclude
- > Notice in wp-content/plugins/rest-api-cache/admin/partials/rest-api-cache-admin-display.php+39
Trying to get property 'routes' of non-object
- 2 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=rest_api_exclude
- > Warning in wp-content/plugins/rest-api-cache/admin/partials/rest-api-cache-admin-display.php+52
Invalid argument supplied for foreach()
- > GET request to /wp-admin/admin.php?page=rest_api_exclude
- > Notice in wp-content/plugins/rest-api-cache/admin/partials/rest-api-cache-admin-display.php+52
Undefined variable: endpointstitle
- > GET request to /wp-admin/admin.php?page=rest_api_exclude
- > Warning in wp-content/plugins/rest-api-cache/admin/partials/rest-api-cache-admin-display.php+63
array_multisort(): Argument #1 is expected to be an array or a sort flag
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/rest-api-cache/public/partials/rest-api-cache-public-display.php
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rest-api-cache/admin/partials/rest-api-cache-setting-display.php:34
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rest-api-cache/admin/partials/rest-api-cache-admin-display.php:31
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
rest-api-cache/rest-api-cache.php Passed 13 tests
"Rest API Cache" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
63 characters long description:
Boost your application speed by caching the WordPress REST API.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,243 lines of code in 26 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 7 | 347 | 403 | 1,425 |
PHP | 13 | 194 | 555 | 542 |
CSS | 6 | 31 | 20 | 276 |
PHP code Passed 2 tests
A brief analysis 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.39 |
Average class complexity | 4.71 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 1.84 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 31 | |
▷ Static methods | 4 | 12.90% |
▷ Public methods | 26 | 83.87% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 16.13% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.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
There are no PNG files in this plugin