Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
- Install procedure had errors
- > Deprecated in wp-content/plugins/smcountdown/smcountdown-widget.php+37
Methods with the same name as their class will not be constructors in a future version of PHP; smcountdown_widget_Widget has a deprecated constructor
Server metrics [RAM: ▼1.64MB] [CPU: ▼295.74ms] Passed 4 tests
Server-side resources used by SM CountDown Widget
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.98 ▼0.74 | 13.54 ▼11.08 |
Dashboard /wp-admin | 2.01 ▼1.05 | 15.03 ▼32.99 |
Posts /wp-admin/edit.php | 2.01 ▼1.10 | 9.60 ▼33.31 |
Add New Post /wp-admin/post-new.php | 2.01 ▼3.42 | 9.95 ▼1,088.42 |
Media Library /wp-admin/upload.php | 2.01 ▼1.00 | 8.99 ▼28.22 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_smcountdown_widget |
Browser metrics Passed 4 tests
Checking browser requirements for SM CountDown Widget
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,819 ▲213 | 16.35 ▲0.71 | 11.99 ▲2.88 | 44.67 ▼2.43 |
Dashboard /wp-admin | 2,963 ▲110 | 6.13 ▲0.26 | 132.33 ▲1.47 | 105.94 ▲2.89 |
Posts /wp-admin/edit.php | 2,710 ▲4 | 2.70 ▲0.01 | 66.14 ▼1.82 | 92.21 ▼0.44 |
Add New Post /wp-admin/post-new.php | 1,857 ▲204 | 18.82 ▲0.17 | 353.38 ▲5.30 | 107.16 ▼4.69 |
Media Library /wp-admin/upload.php | 1,779 ▲4 | 5.01 ▼0.01 | 142.34 ▼5.00 | 114.37 ▲0.50 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- The plugin did not uninstall gracefully
- > User deprecated in wp-includes/functions.php+5304
The called constructor method for WP_Widget in smcountdown_widget_Widget is deprecated since version 4.3.0! Use __construct() instead.
- The uninstall procedure has failed, leaving 1 option in the database
- widget_smcountdown_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test
SRP 50% 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
The following issues need your attention
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/smcountdown/smcountdown-widget.php:37
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: timer, countdown, launch, widget
smcountdown/smcountdown-widget.php 85% from 13 tests
The main file in "SM CountDown Widget" v. 1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
- Main file name: The principal plugin file should be the same as the plugin slug ("smcountdown.php" instead of "smcountdown-widget.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
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
Success! There were no dangerous files found in this plugin409 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 2 | 0 | 42 | 180 |
CSS | 1 | 8 | 1 | 78 |
PO File | 2 | 14 | 14 | 78 |
PHP | 1 | 25 | 39 | 73 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.06 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 4.00 |
Average method complexity | 1.60 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.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 | 5 | |
▷ Static methods | 1 | 20.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 2 | |
▷ Named functions | 2 | 100.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 1 test
Image compression Passed 1 test
PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
timer-bg.png | 0.26KB | 0.61KB | 0.00% |