Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲0.75MB] [CPU: ▲0.43ms] 75% from 4 tests
A check of server-side resources used by DemoPress
It is recommended to improve the following
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,074.71ms on /wp-admin/options-general.php?page=demopress)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.06 ▲0.60 | 47.26 ▲5.00 |
Dashboard /wp-admin | 4.14 ▲0.84 | 55.29 ▲3.90 |
Posts /wp-admin/edit.php | 4.19 ▲0.84 | 56.29 ▲7.32 |
Add New Post /wp-admin/post-new.php | 6.66 ▲0.78 | 92.60 ▼14.51 |
Media Library /wp-admin/upload.php | 4.00 ▲0.78 | 47.12 ▲10.94 |
DemoPress /wp-admin/options-general.php?page=demopress | 4.24 | 1,074.71 |
Server storage [IO: ▲3.75MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 395 new files
Database: no new tables, 11 new options
New WordPress options |
---|
db_upgraded |
dev4press_demopress_info |
widget_theysaidso_widget |
can_compress_scripts |
dev4press_demopress_ctrl |
dev4press_demopress_core |
widget_recent-posts |
theysaidso_admin_options |
dev4press_demopress_task |
dev4press_demopress_settings |
... |
Browser metrics Passed 4 tests
A check of browser resources used by DemoPress
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲33 | 13.67 ▼0.91 | 1.80 ▼0.28 | 40.36 ▼1.99 |
Dashboard /wp-admin | 2,207 ▲22 | 5.83 ▼0.08 | 100.05 ▼8.44 | 43.14 ▼0.93 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.01 ▲0.00 | 37.03 ▼5.84 | 33.54 ▼4.22 |
Add New Post /wp-admin/post-new.php | 1,522 ▼11 | 23.41 ▲0.21 | 693.16 ▲13.21 | 59.06 ▼4.94 |
Media Library /wp-admin/upload.php | 1,392 ▲4 | 4.20 ▼0.01 | 110.62 ▼1.62 | 49.77 ▲1.52 |
DemoPress /wp-admin/options-general.php?page=demopress | 964 | 1.92 | 27.45 | 51.26 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin does not fully uninstall, leaving 11 options in the database
- dev4press_demopress_settings
- dev4press_demopress_task
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- dev4press_demopress_ctrl
- can_compress_scripts
- dev4press_demopress_core
- widget_theysaidso_widget
- dev4press_demopress_info
- ...
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
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
Almost there! Just fix the following items
- 3× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/demopress/d4plib/forms/footer.php
- > /wp-content/plugins/demopress/forms/content-about-whatsnew.php
- > /wp-content/plugins/demopress/d4plib/forms/content-dashboard.php
- 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/demopress/forms/generators/posts.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/demopress/forms/generators/bbpress.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function Dev4Press\\v35\\Functions\\panel() in wp-content/plugins/demopress/forms/sidebar-dashboard.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function Dev4Press\\v35\\Functions\\panel() in wp-content/plugins/demopress/d4plib/forms/sidebar-settings.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/demopress/forms/content-tools-cleanup.php:47
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/demopress/forms/content-tools-export.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/demopress/forms/generators/comments.php:2
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/demopress/d4plib/forms/widget-loader.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function Dev4Press\\v35\\Functions\\panel() in wp-content/plugins/demopress/d4plib/forms/content-settings-full.php:11
- > PHP Fatal error
Uncaught Error: Call to undefined function demopress_settings() in wp-content/plugins/demopress/forms/content-install.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
- Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7, #8, #9 in demopress/assets to your readme.txt
demopress/demopress.php 92% from 13 tests
The primary PHP file in "DemoPress" version 1.6.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
- Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin124,077 lines of code in 359 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 94,295 |
PHP | 208 | 4,574 | 1,775 | 16,033 |
CSS | 42 | 1,071 | 40 | 7,230 |
Sass | 43 | 859 | 3 | 4,002 |
JavaScript | 59 | 233 | 121 | 1,957 |
SVG | 1 | 0 | 0 | 528 |
Markdown | 4 | 20 | 0 | 32 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
Average class complexity | 11.45 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 140.00 |
Average method complexity | 2.65 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 65.00 |
Code structure | ||
---|---|---|
Namespaces | 49 | |
Interfaces | 0 | |
Traits | 4 | |
Classes | 141 | |
▷ Abstract classes | 42 | 29.79% |
▷ Concrete classes | 99 | 70.21% |
▷ Final classes | 2 | 2.02% |
Methods | 970 | |
▷ Static methods | 70 | 7.22% |
▷ Public methods | 692 | 71.34% |
▷ Protected methods | 229 | 23.61% |
▷ Private methods | 49 | 5.05% |
Functions | 137 | |
▷ Named functions | 136 | 99.27% |
▷ Anonymous functions | 1 | 0.73% |
Constants | 67 | |
▷ Global constants | 21 | 31.34% |
▷ Class constants | 46 | 68.66% |
▷ Public constants | 46 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
d4plib/resources/css/flags/flags.png | 80.58KB | 26.01KB | ▼ 67.72% |