Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/csrhub-sustainability-rating-widget/csrhubwidget.php+123
Function create_function() is deprecated
Server metrics [RAM: ▼1.93MB] [CPU: ▼57.71ms] Passed 4 tests
Server-side resources used by CSRHub Sustainability Ratings widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.39 | 4.68 ▼38.76 |
Dashboard /wp-admin | 2.10 ▼1.25 | 5.73 ▼60.47 |
Posts /wp-admin/edit.php | 2.10 ▼1.26 | 5.86 ▼49.25 |
Add New Post /wp-admin/post-new.php | 2.10 ▼3.80 | 6.78 ▼82.34 |
Media Library /wp-admin/upload.php | 2.10 ▼1.14 | 6.00 ▼27.53 |
Server storage [IO: ▲0.13MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
widget_csrhubwidget |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for CSRHub Sustainability Ratings widget
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,814 ▲53 | 14.17 ▼0.39 | 2.17 ▲0.53 | 45.18 ▲5.00 |
Dashboard /wp-admin | 2,198 ▲21 | 5.63 ▲0.01 | 87.12 ▼16.36 | 41.36 ▼3.11 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.98 ▲0.03 | 35.56 ▼5.56 | 35.13 ▼3.71 |
Add New Post /wp-admin/post-new.php | 1,404 ▼122 | 17.95 ▼5.19 | 604.53 ▼63.89 | 52.06 ▼13.80 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.22 ▲0.05 | 99.90 ▼6.56 | 45.26 ▼0.41 |
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
You still need to fix the following
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/csrhub-sustainability-rating-widget/csrhubwidget.php+123
Function create_function() is deprecated
- The uninstall procedure has failed, leaving 7 options in the database
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- widget_csrhubwidget
- widget_recent-comments
- can_compress_scripts
- db_upgraded
Smoke tests 75% 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 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 fix the following
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/csrhub-sustainability-rating-widget/csrhubwidget.php:11
- > PHP Fatal error
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 90% 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
These attributes need your attention:
- Screenshots: These screenshots have no corresponding images in /assets: #1 (Widget in small 170x200 px size.), #2 (Widget in medium 300x400 px and 300x300 px (without teaser) sizes.), #3 (Widget in wide 650x100 px size.)
- Tags: You are using too many tags: 14 tag instead of maximum 10
csrhub-sustainability-rating-widget/csrhubwidget.php 92% from 13 tests
The main PHP file in "CSRHub Sustainability Ratings widget" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("csrhub-sustainability-rating-widget.php" instead of "csrhubwidget.php")
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
No dangerous file extensions were detected94 lines of code in 1 file:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 17 | 16 | 94 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.14 |
Average class complexity | 6.00 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.83 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 5.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 6 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 83.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 16.67% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
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
Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin