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.25MB] [CPU: ▲1.05ms] Passed 4 tests
An overview of server-side resources used by Demonstrator
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.72 ▲0.26 | 47.68 ▲6.62 |
Dashboard /wp-admin | 3.59 ▲0.29 | 60.81 ▲10.73 |
Posts /wp-admin/edit.php | 3.64 ▲0.28 | 51.14 ▲3.61 |
Add New Post /wp-admin/post-new.php | 6.11 ▲0.22 | 86.85 ▼13.45 |
Media Library /wp-admin/upload.php | 3.45 ▲0.22 | 39.69 ▲7.41 |
Demonstrator /wp-admin/admin.php?page=demonstrator_settings | 3.63 | 45.86 |
Themes Demo /wp-admin/admin.php?page=demonstrator_instance_themes | 3.59 | 47.54 |
Server storage [IO: ▲0.61MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 93 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_theysaidso_widget |
can_compress_scripts |
demonstrator_instance_themes |
demonstrator_settings |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Demonstrator
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,839 ▲104 | 13.21 ▼1.17 | 5.33 ▲3.72 | 42.98 ▼5.20 |
Dashboard /wp-admin | 2,239 ▲51 | 4.85 ▼0.05 | 103.01 ▼3.86 | 40.03 ▲0.98 |
Posts /wp-admin/edit.php | 2,122 ▲33 | 2.00 ▼0.02 | 34.81 ▼2.53 | 30.27 ▼3.74 |
Add New Post /wp-admin/post-new.php | 1,575 ▲41 | 18.20 ▼4.98 | 600.74 ▼26.50 | 71.64 ▲16.59 |
Media Library /wp-admin/upload.php | 1,421 ▲33 | 4.23 ▲0.02 | 100.37 ▼5.72 | 42.09 ▼0.91 |
Demonstrator /wp-admin/admin.php?page=demonstrator_settings | 1,608 | 3.51 | 54.24 | 100.70 |
Themes Demo /wp-admin/admin.php?page=demonstrator_instance_themes | 1,781 | 3.50 | 57.50 | 83.16 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- This plugin did not uninstall successfully, leaving 8 options in the database
- demonstrator_instance_themes
- widget_recent-comments
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- demonstrator_settings
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
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
Please take a closer look at the following
- 29× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Warning
include_once(DEMONSTRATOR_PATHautoloader.php): failed to open stream: No such file or directory in wp-content/plugins/demonstrator/plugin.php on line 90
- > PHP Fatal error
require_once(): Failed opening required 'DEMONSTRATOR_PATHwarnings/abstract-warning.php' (include_path='.:/usr/share/php') in wp-content/plugins/demonstrator/warnings/php-warning.php on line 2
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/demonstrator/components/Activate/component.php:56
- > PHP Fatal error
Uncaught Error: Class 'Demonstrator\\Assets\\Manage' not found in wp-content/plugins/demonstrator/plugin.php:93
- > PHP Fatal error
Uncaught Error: Class 'Demonstrator\\AbstractFieldType' not found in wp-content/plugins/demonstrator/engine/FieldInfoField.class.php:5
- > PHP Fatal error
Uncaught Error: Class 'Demonstrator\\AbstractFieldType' not found in wp-content/plugins/demonstrator/engine/FieldPageSelect.class.php:5
- > PHP Fatal error
Uncaught Error: Class 'Demonstrator\\AbstractFieldType' not found in wp-content/plugins/demonstrator/engine/FieldImage.class.php:5
- > PHP Warning
require_once(DEMONSTRATOR_PATHwarnings/abstract-warning.php): failed to open stream: No such file or directory in wp-content/plugins/demonstrator/warnings/php-warning.php on line 2
- > PHP Warning
require_once(DEMONSTRATOR_PATHwarnings/abstract-warning.php): failed to open stream: No such file or directory in wp-content/plugins/demonstrator/warnings/noplugin-warning.php on line 2
- > PHP Fatal error
Uncaught Error: Class 'Demonstrator\\AbstractFieldType' not found in wp-content/plugins/demonstrator/engine/FieldRadio.class.php:5
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 88% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
- Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in demonstrator/assets to your readme.txt
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== demonstrator ===
)
demonstrator/demonstrator.php Passed 13 tests
This is the main PHP file of "Demonstrator" version 1.3.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
27 characters long description:
More than a theme switcher!
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
Everything looks great! No dangerous files found in this plugin9,144 lines of code in 79 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
LESS | 8 | 319 | 283 | 2,337 |
PHP | 36 | 659 | 430 | 2,099 |
CSS | 8 | 304 | 173 | 1,623 |
JavaScript | 11 | 336 | 252 | 1,099 |
XML | 10 | 0 | 0 | 907 |
HTML | 2 | 97 | 4 | 650 |
SVG | 1 | 0 | 3 | 248 |
Sass | 1 | 23 | 0 | 110 |
Markdown | 1 | 23 | 0 | 60 |
JSON | 1 | 0 | 0 | 11 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 8.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 36.00 |
Average method complexity | 2.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 29 | |
▷ Abstract classes | 2 | 6.90% |
▷ Concrete classes | 27 | 93.10% |
▷ Final classes | 2 | 7.41% |
Methods | 154 | |
▷ Static methods | 1 | 0.65% |
▷ Public methods | 149 | 96.75% |
▷ Protected methods | 5 | 3.25% |
▷ Private methods | 0 | 0.00% |
Functions | 10 | |
▷ Named functions | 7 | 70.00% |
▷ Anonymous functions | 3 | 30.00% |
Constants | 7 | |
▷ Global constants | 7 | 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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/github.png | 0.55KB | 0.54KB | ▼ 1.25% |
assets/img/happy.png | 2.70KB | 2.18KB | ▼ 19.33% |
assets/img/code.png | 0.91KB | 0.88KB | ▼ 2.91% |