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
- The plugin cannot be installed
- > Warning in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin.php+315
Declaration of Yawp_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)
Server metrics [RAM: ▼1.83MB] [CPU: ▼54.61ms] Passed 4 tests
This is a short check of server-side resources used by Yet Another Weather Plugin
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.16 ▼1.30 | 4.97 ▼31.68 |
Dashboard /wp-admin | 2.18 ▼1.16 | 6.23 ▼52.91 |
Posts /wp-admin/edit.php | 2.18 ▼1.17 | 5.53 ▼43.10 |
Add New Post /wp-admin/post-new.php | 2.18 ▼3.70 | 5.74 ▼90.74 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 6.16 ▼31.17 |
Yawp /wp-admin/options-general.php?page=Yawp | 2.18 | 5.69 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 40 new files
Database: no new tables, 10 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
yawp_widget_font_style |
widget_yawp_widget |
can_compress_scripts |
yawp_widget_bg_style |
db_upgraded |
widget_recent-comments |
yawp_version |
Browser metrics Passed 4 tests
Checking browser requirements for Yet Another Weather Plugin
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲85 | 14.77 ▲0.36 | 2.01 ▲0.26 | 40.14 ▼0.06 |
Dashboard /wp-admin | 2,210 ▲22 | 4.85 ▼1.05 | 109.08 ▲7.29 | 39.14 ▼5.08 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.02 ▲0.02 | 39.23 ▲2.20 | 35.85 ▼0.02 |
Add New Post /wp-admin/post-new.php | 1,545 ▲26 | 18.47 ▼4.76 | 607.08 ▼76.97 | 48.39 ▼14.22 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.19 ▲0.10 | 96.38 ▼6.24 | 42.14 ▼0.50 |
Yawp /wp-admin/options-general.php?page=Yawp | 912 | 2.08 | 26.16 | 28.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
- Uninstall procedure had uncaught errors
- > Warning in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin.php+315
Declaration of Yawp_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)
- The uninstall procedure has failed, leaving 7 options in the database
- widget_recent-comments
- theysaidso_admin_options
- widget_recent-posts
- widget_yawp_widget
- can_compress_scripts
- db_upgraded
- widget_theysaidso_widget
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=Yawp
- > Warning in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin.php+315
Declaration of Yawp_Widget::widget() should be compatible with WP_Widget::widget($args, $instance)
- > GET request to /wp-admin/options-general.php?page=Yawp
- > Warning in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin.php+372
Declaration of Yawp_Widget::update() should be compatible with WP_Widget::update($new_instance, $old_instance)
- > GET request to /wp-admin/options-general.php?page=Yawp
- > Warning in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin.php+367
Declaration of Yawp_Widget::form() should be compatible with WP_Widget::form($instance)
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=Yawp
- > User deprecated in wp-includes/functions.php+5737
Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
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
Almost there! Just fix the following items
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin.php:17
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/yet-another-weather-plugin/yet-another-weather-plugin-admin.php:86
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
- > GET request to /wp-admin/options-general.php?page=Yawp
- > Network (severe)
https://www.paypalobjects.com/ru_RU/i/scr/pixel.gif - Failed to load resource: the server responded with a status of 404 ()
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: openweathermap, weather, weather widget, yawp, widget
yet-another-weather-plugin/yet-another-weather-plugin.php Passed 13 tests
The principal PHP file in "Yet Another Weather Plugin" v. 1.1.3 is loaded by WordPress automatically on each request
66 characters long description:
Allows to retrive weather for a given city from openweathermap.org
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin437 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 115 | 72 | 361 |
JavaScript | 2 | 20 | 30 | 53 |
CSS | 1 | 4 | 0 | 23 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.27 |
Average class complexity | 9.00 |
▷ Minimum class complexity | 9.00 |
▷ Maximum class complexity | 9.00 |
Average method complexity | 3.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 9.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 | 11 | |
▷ Named functions | 11 | 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 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 PNG files occupy 0.28MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/scatteredclouds_day.png | 6.86KB | 3.93KB | ▼ 42.71% |
images/hail_night.png | 7.35KB | 4.72KB | ▼ 35.75% |
images/fewclouds_night.png | 5.62KB | 3.47KB | ▼ 38.20% |
images/lightsnow_day.png | 7.69KB | 4.39KB | ▼ 42.94% |
images/thunderstorm_night.png | 9.50KB | 5.81KB | ▼ 38.82% |