Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/cpt-list/inc/cpt-list.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; CPTList has a deprecated constructor
Server metrics [RAM: ▼0.50MB] [CPU: ▼194.37ms] Passed 4 tests
Analyzing server-side resources used by CPT List
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.13 ▲0.41 | 9.34 ▼12.26 |
Dashboard /wp-admin | 3.15 ▲0.09 | 8.73 ▼34.81 |
Posts /wp-admin/edit.php | 3.15 ▲0.04 | 8.79 ▼36.05 |
Add New Post /wp-admin/post-new.php | 3.15 ▼2.29 | 8.47 ▼675.62 |
Media Library /wp-admin/upload.php | 3.15 ▲0.15 | 8.35 ▼30.99 |
CPT List /wp-admin/plugins.php?page=cpt-list/cpt-list.php | 3.25 | 7.39 |
Server storage [IO: ▲1.27MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 62 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_cptlist |
Browser metrics Passed 4 tests
Checking browser requirements for CPT List
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,997 ▲401 | 17.85 ▲2.27 | 12.90 ▲4.87 | 47.46 ▼1.40 |
Dashboard /wp-admin | 3,176 ▲245 | 7.89 ▲1.68 | 162.87 ▲13.96 | 114.04 ▼3.93 |
Posts /wp-admin/edit.php | 2,971 ▲232 | 4.29 ▲1.45 | 79.17 ▲13.93 | 95.61 ▲0.55 |
Add New Post /wp-admin/post-new.php | 1,679 ▲98 | 18.79 ▲2.31 | 344.07 ▼246.82 | 124.65 ▼1,696.96 |
Media Library /wp-admin/upload.php | 1,820 ▲13 | 4.82 ▼0.24 | 115.17 ▼107.01 | 114.32 ▼88.11 |
CPT List /wp-admin/plugins.php?page=cpt-list/cpt-list.php | 2,878 | 3.40 | 68.62 | 107.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Uninstall procedure validation failed for this plugin
- > Deprecated in wp-content/plugins/cpt-list/inc/cpt-list.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; CPTList has a deprecated constructor
- Zombie WordPress options detected upon uninstall: 1 option
- widget_cptlist
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/plugins.php?page=cpt-list/cpt-list.php
- > Deprecated in wp-content/plugins/cpt-list/inc/cpt-list.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; CPTList has a deprecated constructor
- 10 occurences, only the last one shown
- > GET request to /wp-admin/plugins.php?page=cpt-list/cpt-list.php
- > Notice in wp-content/plugins/cpt-list/cpt-list.php+566
Trying to access array offset on value of type bool
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 2× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpt-list/cpt-list.php:32
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpt-list/inc/cpt-list.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: shortcode, widget, type, plugin, custom...
cpt-list/cpt-list.php Passed 13 tests
The main PHP file in "CPT List" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
61 characters long description:
Will add the custom post type list view shortcode and widget.
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected10,130 lines of code in 43 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
CSS | 6 | 17 | 45 | 3,032 |
LESS | 18 | 54 | 38 | 2,729 |
PHP | 2 | 88 | 34 | 1,762 |
Sass | 13 | 28 | 24 | 1,520 |
SVG | 1 | 0 | 0 | 640 |
PO File | 1 | 149 | 244 | 327 |
JavaScript | 2 | 3 | 2 | 120 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 251)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 313.00 |
▷ Minimum class complexity | 268.00 |
▷ Maximum class complexity | 358.00 |
Average method complexity | 15.86 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 251.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 | 42 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 39 | 92.86% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 7.14% |
Functions | 11 | |
▷ Named functions | 10 | 90.91% |
▷ Anonymous functions | 1 | 9.09% |
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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/default-thumbnail.png | 15.07KB | 5.47KB | ▼ 63.70% |