Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▼1.52MB] [CPU: ▼50.25ms] Passed 4 tests
Analyzing server-side resources used by Whistles
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.46 ▼1.00 | 9.87 ▼29.88 |
Dashboard /wp-admin | 2.50 ▼0.84 | 12.69 ▼49.44 |
Posts /wp-admin/edit.php | 2.50 ▼0.85 | 12.43 ▼35.51 |
Add New Post /wp-admin/post-new.php | 2.50 ▼3.38 | 11.49 ▼86.18 |
Media Library /wp-admin/upload.php | 2.50 ▼0.72 | 11.10 ▼24.65 |
Whistle Groups /wp-admin/edit-tags.php?taxonomy=whistle_group&post_type=whistle | 2.50 | 14.11 |
Whistles /wp-admin/edit.php?post_type=whistle | 2.50 | 13.28 |
Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
widget_whistles |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Whistles
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,841 ▲95 | 14.76 ▲0.00 | 1.87 ▲0.07 | 42.18 ▲2.00 |
Dashboard /wp-admin | 2,217 ▲29 | 5.02 ▼0.83 | 109.32 ▲5.10 | 37.97 ▼2.63 |
Posts /wp-admin/edit.php | 2,100 ▲11 | 2.05 ▲0.01 | 42.26 ▲1.07 | 34.91 ▼1.73 |
Add New Post /wp-admin/post-new.php | 1,572 ▲30 | 23.23 ▲5.13 | 626.76 ▲16.52 | 62.53 ▲11.41 |
Media Library /wp-admin/upload.php | 1,393 ▲2 | 4.21 ▲0.00 | 98.85 ▲1.00 | 43.52 ▼0.98 |
Whistle Groups /wp-admin/edit-tags.php?taxonomy=whistle_group&post_type=whistle | 1,242 | 2.13 | 26.75 | 26.43 |
Whistles /wp-admin/edit.php?post_type=whistle | 1,072 | 1.95 | 30.62 | 27.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- The plugin did not uninstall gracefully
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in Whistles_Widget is deprecated since version 4.3.0! Use __construct() instead.
- Zombie WordPress options were found after uninstall: 7 options
- db_upgraded
- widget_whistles
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=whistle
- > POST request to /wp-admin/admin-ajax.php
- > User deprecated in wp-includes/functions.php+5546
The called constructor method for WP_Widget class in Whistles_Widget is deprecated since version 4.3.0! Use __construct() instead.
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
Please fix the following
- 9× 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/whistles/inc/post-types.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whistles/inc/functions.php:15
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/whistles/inc/class-whistles-widget.php:14
- > PHP Fatal error
Uncaught Error: Class 'Whistles_And_Bells' not found in wp-content/plugins/whistles/inc/class-whistles-and-accordions.php:14
- > PHP Fatal error
Uncaught Error: Class 'Whistles_And_Bells' not found in wp-content/plugins/whistles/inc/class-whistles-and-toggles.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whistles/inc/taxonomies.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whistles/whistles.php:48
- > PHP Fatal error
Uncaught Error: Class 'Whistles_And_Bells' not found in wp-content/plugins/whistles/inc/class-whistles-and-tabs.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/whistles/admin/admin.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 97% 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 have no corresponding images in /assets: #1 (Add `[whistles]` shortcode media button popup), #2 (Manage Whistles admin screen), #3 (Accordions view), #4 (Tabs view), #5 (Toggles view)
whistles/whistles.php Passed 13 tests
This is the main PHP file of "Whistles" version 0.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
99 characters long description:
A plugin for managing tabs, toggles, accordions, and other types of content on a WordPress install.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin806 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 208 | 492 | 625 |
CSS | 2 | 19 | 15 | 96 |
JavaScript | 2 | 10 | 3 | 57 |
Markdown | 1 | 21 | 0 | 28 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 6.67 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 11.00 |
Average method complexity | 2.70 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 1 | 16.67% |
Methods | 20 | |
▷ Static methods | 8 | 40.00% |
▷ Public methods | 20 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 11 | |
▷ Named functions | 11 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
5 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-5.png | 59.85KB | 58.50KB | ▼ 2.27% |
screenshot-2.png | 12.31KB | 12.29KB | 0.20% |
screenshot-1.png | 10.01KB | 9.99KB | 0.27% |
screenshot-3.png | 6.45KB | 6.29KB | ▼ 2.45% |
screenshot-4.png | 10.95KB | 10.78KB | ▼ 1.58% |