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
You still need to fix the following installer errors
- This plugin did not install gracefully
- > Deprecated in wp-content/plugins/image-in-the-widget/image-widget.php+24
Methods with the same name as their class will not be constructors in a future version of PHP; sap_Image_Widget has a deprecated constructor
Server metrics [RAM: ▼1.85MB] [CPU: ▼169.01ms] Passed 4 tests
Server-side resources used by Image In The Widget
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.16 ▼1.30 | 4.90 ▼44.67 |
Dashboard /wp-admin | 2.18 ▼1.20 | 6.76 ▼494.96 |
Posts /wp-admin/edit.php | 2.18 ▼1.18 | 6.21 ▼48.31 |
Add New Post /wp-admin/post-new.php | 2.18 ▼3.71 | 7.99 ▼88.08 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 6.09 ▼28.52 |
Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests
A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_recent-posts |
db_upgraded |
widget_widget_sp_image |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Image In The Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,823 ▲73 | 13.19 ▼0.99 | 4.63 ▲2.76 | 47.17 ▲6.93 |
Dashboard /wp-admin | 2,218 ▲12 | 5.85 ▼0.18 | 112.87 ▲3.53 | 44.41 ▲5.40 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.00 | 36.44 ▼4.70 | 33.83 ▼1.45 |
Add New Post /wp-admin/post-new.php | 1,545 ▼0 | 23.15 ▼0.05 | 653.92 ▲39.94 | 50.45 ▼2.37 |
Media Library /wp-admin/upload.php | 1,397 ▲3 | 4.28 ▲0.11 | 97.79 ▼7.09 | 41.17 ▼4.49 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/image-in-the-widget/image-widget.php+24
Methods with the same name as their class will not be constructors in a future version of PHP; sap_Image_Widget has a deprecated constructor
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- widget_widget_sp_image
- theysaidso_admin_options
- widget_theysaidso_widget
- 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)
Everything seems fine, however this is by no means an exhaustive test
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 items
- 4× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/image-in-the-widget/views/widget-admin.deprecated.php
- > /wp-content/plugins/image-in-the-widget/views/widget.php
- > /wp-content/plugins/image-in-the-widget/views/widget-admin.php
- > /wp-content/plugins/image-in-the-widget/image-widget.php
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: image in the sidebar, image widget for wordpress
image-in-the-widget/image-widget.php 92% from 13 tests
The main file in "Image In The Widget" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("image-in-the-widget.php" instead of "image-widget.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected722 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 92 | 175 | 495 |
JavaScript | 3 | 55 | 57 | 227 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 40.00 |
▷ Minimum class complexity | 30.00 |
▷ Maximum class complexity | 50.00 |
Average method complexity | 4.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 20.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 | 24 | |
▷ Static methods | 3 | 12.50% |
▷ Public methods | 19 | 79.17% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 20.83% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 2 | 100.00% |
▷ Public constants | 2 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin