Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/current-weather-widget/current-weather-widget.php+138
Function create_function() is deprecated
Server metrics [RAM: ▼1.96MB] [CPU: ▼56.07ms] Passed 4 tests
A check of server-side resources used by Current weather widget
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.44 | 4.41 ▼37.23 |
Dashboard /wp-admin | 2.05 ▼1.26 | 6.38 ▼43.00 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 6.10 ▼49.62 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 6.45 ▼94.41 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 6.27 ▼31.61 |
Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_current-weather-widget |
widget_theysaidso_widget |
widget_recent-comments |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Current weather widget
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.38 ▲0.02 | 1.74 ▲0.05 | 42.96 ▼0.25 |
Dashboard /wp-admin | 2,192 ▲18 | 5.55 ▼0.07 | 82.46 ▼8.52 | 39.02 ▼4.74 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.01 ▲0.02 | 39.38 ▲0.83 | 32.25 ▼4.09 |
Add New Post /wp-admin/post-new.php | 1,546 ▲15 | 23.13 ▼0.13 | 694.70 ▲20.91 | 60.93 ▲8.09 |
Media Library /wp-admin/upload.php | 1,394 ▼6 | 4.24 ▲0.00 | 102.43 ▲1.95 | 43.08 ▼5.20 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/current-weather-widget/current-weather-widget.php+138
Function create_function() is deprecated
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-posts
- widget_current-weather-widget
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
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 no errors were found, 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 take a closer look at the following
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/current-weather-widget/views/admin.php:1
- > PHP Fatal error
Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/current-weather-widget/views/widget.php:6
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/current-weather-widget/current-weather-widget.php:12
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: weather, widget
current-weather-widget/current-weather-widget.php Passed 13 tests
The main PHP script in "Current weather widget" version 0.0.1 is automatically included on every request by WordPress
66 characters long description:
Sidebar widget that displays the current weather for a given city.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected551 lines of code in 8 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 25 | 46 | 356 |
JavaScript | 2 | 17 | 25 | 138 |
CSS | 2 | 0 | 8 | 57 |
PHP code Passed 2 tests
An short overview of 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.07 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 4.00 |
▷ Maximum class complexity | 4.00 |
Average method complexity | 1.75 |
▷ 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 | 4 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 4 | 100.00% |
▷ Public constants | 4 | 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