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
Please fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/oplao-weather-professional-weather-widget/widget.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; OplaoWeatherWidget has a deprecated constructor
Server metrics [RAM: ▼1.66MB] [CPU: ▼49.61ms] Passed 4 tests
This is a short check of server-side resources used by Oplao Weather Widget
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.33 ▼1.13 | 6.25 ▼35.41 |
Dashboard /wp-admin | 2.35 ▼0.96 | 7.85 ▼42.79 |
Posts /wp-admin/edit.php | 2.35 ▼1.01 | 7.20 ▼38.87 |
Add New Post /wp-admin/post-new.php | 2.35 ▼3.54 | 7.97 ▼81.35 |
Media Library /wp-admin/upload.php | 2.35 ▼0.88 | 6.48 ▼27.15 |
Oplao Weather /wp-admin/options-general.php?page=oplao-weather | 2.35 | 6.42 |
Server storage [IO: ▲7.75MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 167 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_oplaoweatherwidget |
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Oplao Weather Widget
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,840 ▲105 | 13.24 ▼1.14 | 4.85 ▲3.19 | 42.52 ▼1.99 |
Dashboard /wp-admin | 2,210 ▲22 | 5.88 ▲1.02 | 102.47 ▼5.30 | 40.47 ▼6.49 |
Posts /wp-admin/edit.php | 2,093 ▲1 | 2.02 ▲0.05 | 33.88 ▼5.52 | 35.13 ▼1.27 |
Add New Post /wp-admin/post-new.php | 1,534 ▲14 | 23.15 ▲0.17 | 660.18 ▼18.39 | 54.47 ▼15.03 |
Media Library /wp-admin/upload.php | 1,392 ▲1 | 4.20 ▼0.03 | 96.19 ▼6.21 | 40.50 ▼6.30 |
Oplao Weather /wp-admin/options-general.php?page=oplao-weather | 789 | 2.04 | 25.89 | 25.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- The plugin did not uninstall gracefully
- > Deprecated in wp-content/plugins/oplao-weather-professional-weather-widget/widget.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; OplaoWeatherWidget has a deprecated constructor
- The uninstall procedure has failed, leaving 7 options in the database
- widget_recent-posts
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_oplaoweatherwidget
- db_upgraded
Smoke tests 25% 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)
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=oplao-weather
- > Deprecated in wp-content/plugins/oplao-weather-professional-weather-widget/widget.php+4
Methods with the same name as their class will not be constructors in a future version of PHP; OplaoWeatherWidget has a deprecated constructor
- > GET request to /wp-admin/options-general.php?page=oplao-weather
- > Deprecated in wp-content/plugins/oplao-weather-professional-weather-widget/widget.php+220
Function create_function() is deprecated
SRP 0% 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
Please fix the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php
- > /wp-content/plugins/oplao-weather-professional-weather-widget/inc/Forcast.php
- 42× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 33
- > PHP Notice
Trying to get property 'temp_c' of non-object in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 26
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 33
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 26
- > PHP Notice
Trying to get property 'wind_dir' of non-object in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 38
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 30
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 36
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 37
- > PHP Notice
Undefined property: stdClass::$current in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 38
- > PHP Notice
Trying to get property 'humidity' of non-object in wp-content/plugins/oplao-weather-professional-weather-widget/inc/Current.php on line 39
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 81% 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 require images: #6 (Basic tall layout), #7 (Basic tall layout), #8 (Basic tall layout)
- Tags: You are using too many tags: 11 tag instead of maximum 10
- Plugin Name: Please specify the plugin name on the first line (
=== oplao-weather-professional-weather-widget ===
)
oplao-weather-professional-weather-widget/oplao-weather.php 85% from 13 tests
"Oplao Weather Widget" version 1.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("oplao-weather-professional-weather-widget.php" instead of "oplao-weather.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin9,844 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 6 | 0 | 0 | 7,750 |
CSS | 2 | 258 | 15 | 1,114 |
PHP | 6 | 157 | 57 | 979 |
HTML | 1 | 0 | 0 | 1 |
JavaScript | 1 | 2 | 33 | 0 |
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.36 |
Average class complexity | 26.00 |
▷ Minimum class complexity | 8.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 6.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.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 | 10 | |
▷ Static methods | 5 | 50.00% |
▷ Public methods | 10 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 16 | |
▷ Named functions | 16 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 3 | 100.00% |
▷ Public constants | 3 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
131 PNG files occupy 4.86MB with 3.65MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/large/326_day_lg.png | 30.38KB | 7.80KB | ▼ 74.33% |
img/large/293_night_lg.png | 31.98KB | 7.78KB | ▼ 75.67% |
img/large/122_day_lg.png | 25.61KB | 6.70KB | ▼ 73.83% |
img/large/356_day_lg.png | 32.40KB | 7.83KB | ▼ 75.82% |
img/large/353_night_lg.png | 28.98KB | 7.10KB | ▼ 75.50% |