83% australian-weather-widget-willyweather

Code Review | Australian Weather Widget - WillyWeather

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

About plugin

  • Plugin page: australian-weathe...
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 2, 2013
  • Latest release: Oct 16, 2017
  • Number of updates: 17
  • Update frequency: every 86.8 days
  • Top authors: WillyWeather (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /8,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.31ms] Passed 4 tests

An overview of server-side resources used by Australian Weather Widget - WillyWeather
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.16 ▼2.16
Dashboard /wp-admin3.34 ▲0.0341.81 ▼11.44
Posts /wp-admin/edit.php3.39 ▲0.0348.34 ▲0.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.68 ▼8.62
Media Library /wp-admin/upload.php3.26 ▲0.0337.12 ▲1.66

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Australian Weather Widget - WillyWeather
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7713.74 ▼0.911.80 ▼0.6139.46 ▼16.84
Dashboard /wp-admin2,212 ▲275.20 ▼0.68107.95 ▲1.9638.51 ▼2.74
Posts /wp-admin/edit.php2,105 ▲162.38 ▲0.3439.35 ▲3.7536.91 ▲6.04
Add New Post /wp-admin/post-new.php1,533 ▼423.12 ▲4.83677.99 ▲72.1258.50 ▼9.93
Media Library /wp-admin/upload.php1,397 ▲64.45 ▲0.2495.53 ▼7.4941.69 ▼1.00

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/australian-weather-widget-willyweather/willyweather.php:35

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 require attention:
  • Tags: There are too many tags (33 tag instead of maximum 10)
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "Australian Weather Widget - WillyWeather" version 1.5
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("australian-weather-widget-willyweather.php" instead of "willyweather.php")
  • Description: The description should be shorter than 140 characters (currently 302 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected556 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript113028281
CSS11510138
PHP1529137

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin