Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
- The plugin cannot be installed
- > Notice in wp-content/plugins/related-items/plugin-loader.php+33
Undefined index: action
Server metrics [RAM: ▼0.13MB] [CPU: ▼14.42ms] Passed 4 tests
This is a short check of server-side resources used by Related Items
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 39.93 ▲2.10 |
Dashboard /wp-admin | 3.24 ▼0.07 | 33.75 ▼10.13 |
Posts /wp-admin/edit.php | 3.30 ▼0.06 | 37.92 ▼10.22 |
Add New Post /wp-admin/post-new.php | 5.48 ▼0.40 | 70.10 ▼27.46 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 27.86 ▼9.86 |
Related Items /wp-admin/options-general.php?page=related-items/plugin-admin.php | 3.21 | 30.27 |
Server storage [IO: ▲1.74MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
Related Items: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,810 ▲53 | 13.59 ▲0.41 | 4.32 ▼1.64 | 43.56 ▼3.00 |
Dashboard /wp-admin | 2,208 ▲20 | 5.82 ▲0.99 | 100.05 ▼4.79 | 36.88 ▼0.75 |
Posts /wp-admin/edit.php | 2,104 ▲12 | 2.23 ▲0.22 | 40.65 ▼2.76 | 34.02 ▼4.67 |
Add New Post /wp-admin/post-new.php | 6,255 ▲4,713 | 26.02 ▲7.74 | 940.86 ▲307.01 | 62.83 ▲12.53 |
Media Library /wp-admin/upload.php | 1,396 ▲8 | 4.25 ▲0.06 | 95.75 ▼4.67 | 40.66 ▼3.30 |
Related Items /wp-admin/options-general.php?page=related-items/plugin-admin.php | 1,266 | 4.53 | 118.73 | 39.54 |
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
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-posts
- theysaidso_admin_options
- db_upgraded
- widget_recent-comments
- 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/options-general.php?page=related-items/plugin-admin.php
- > User deprecated in wp-includes/functions.php+5828
Hook contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.
- 14 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=related-items/plugin-admin.php
- > Warning in wp-content/plugins/related-items/plugin-admin.php+326
in_array() expects parameter 2 to be array, bool given
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
The following issues need your attention
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/related-items/plugin-loader.php:28
- > PHP Fatal error
Uncaught Error: Class 'Related_Items' not found in wp-content/plugins/related-items/plugin-admin.php:3
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
- > GET request to /wp-admin/options-general.php?page=related-items/plugin-admin.php
- > Console-api (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/related-items/scripts.js?ver=1.1:35:23)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
- > GET request to /wp-admin/options-general.php?page=related-items/plugin-admin.php
- > Javascript (severe) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Create and Manage Related Items screenshot.), #2 (Choose Which Custom Post Types to Relate.), #3 (Example Output), #4 (Example Output Closeup), #5 (Related Items Manager Closeup)
related-items/plugin-loader.php 92% from 13 tests
The primary PHP file in "Related Items" version 1.1.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
- Main file name: Name the main plugin file the same as the plugin slug ("related-items.php" instead of "plugin-loader.php")
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 plugin492 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 271 | 74 | 385 |
CSS | 1 | 22 | 0 | 77 |
JavaScript | 1 | 13 | 3 | 30 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 20.50 |
▷ Minimum class complexity | 15.00 |
▷ Maximum class complexity | 26.00 |
Average method complexity | 3.05 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 19 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 18 | 94.74% |
▷ Protected methods | 1 | 5.26% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/delete.png | 0.72KB | 0.77KB | 0.00% |
images/bullet_red.png | 1.08KB | 1.09KB | 0.00% |
images/bullet_green.png | 3.62KB | 0.95KB | ▼ 73.80% |