83% us-weather-widget-willyweather

Code Review | US Weather Widget - WillyWeather

WordPress plugin US Weather Widget - WillyWeather scored83%from 54 tests.

About plugin

  • Plugin page: us-weather-widget...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.8.2
  • WordPress version: 6.3.1
  • First release: Feb 11, 2014
  • Latest release: Oct 17, 2017
  • Number of updates: 10
  • Update frequency: every 134.4 days
  • Top authors: WillyWeather (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /9,158 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.52ms] Passed 4 tests

Server-side resources used by US Weather Widget - WillyWeather
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.13 ▼2.69
Dashboard /wp-admin3.32 ▼0.0342.45 ▼25.85
Posts /wp-admin/edit.php3.37 ▲0.0145.07 ▲3.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.69 ▼10.99
Media Library /wp-admin/upload.php3.24 ▲0.0133.59 ▲1.45

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_ww_widget
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for US Weather Widget - WillyWeather
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲3714.35 ▲0.111.70 ▲0.0939.80 ▼1.88
Dashboard /wp-admin2,204 ▲274.89 ▼0.7882.89 ▼9.5940.22 ▼0.67
Posts /wp-admin/edit.php2,110 ▲102.35 ▲0.3635.42 ▲0.9234.52 ▼1.94
Add New Post /wp-admin/post-new.php1,530 ▲223.57 ▲0.54687.64 ▲8.9461.88 ▲12.76
Media Library /wp-admin/upload.php1,409 ▲64.44 ▲0.2693.16 ▼4.3343.23 ▼0.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_ww_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/us-weather-widget-willyweather/willyweather.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 34 tag instead of maximum 10
You can take inspiration from this readme.txt

us-weather-widget-willyweather/willyweather.php 85% from 13 tests

"US Weather Widget - WillyWeather" version 1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 320 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("us-weather-widget-willyweather.php" instead of "willyweather.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin556 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113028281
CSS11510138
PHP1529137

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin