78% weather-forecast-widget

Code Review | Weather Forecast Widget

WordPress plugin Weather Forecast Widget scored78%from 54 tests.

About plugin

  • Plugin page: weather-forecast-...
  • Plugin version: 1.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8.2
  • WordPress version: 6.3.1
  • First release: Apr 10, 2021
  • Latest release: Jan 17, 2022
  • Number of updates: 30
  • Update frequency: every 9.5 days
  • Top authors: adminbergtourentipptirol (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /4,028 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▲0.57ms] Passed 4 tests

This is a short check of server-side resources used by Weather Forecast Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.15 ▼2.45
Dashboard /wp-admin3.37 ▲0.0749.39 ▲1.98
Posts /wp-admin/edit.php3.49 ▲0.1354.78 ▲5.26
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.83 ▼2.51
Media Library /wp-admin/upload.php3.27 ▲0.0440.91 ▲7.31
Shortcodes /wp-admin/admin.php?page=wfw_shortcodes_page3.3436.34
Settings /wp-admin/admin.php?page=wfw_settings_page3.2936.26
Weather Forecast Widget /wp-admin/admin.php?page=wfw_menu_page3.3039.37

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 357 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Weather Forecast Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,107 ▲36115.33 ▲1.047.77 ▲5.9239.02 ▼5.64
Dashboard /wp-admin2,385 ▲1946.43 ▲1.54135.60 ▲30.8744.44 ▲1.92
Posts /wp-admin/edit.php2,291 ▲1993.38 ▲1.3951.78 ▲9.9534.61 ▼2.54
Add New Post /wp-admin/post-new.php1,701 ▲16722.15 ▼1.14628.77 ▼58.7439.20 ▼35.31
Media Library /wp-admin/upload.php1,424 ▲364.10 ▼0.05119.89 ▲18.1160.30 ▲14.17
Shortcodes /wp-admin/admin.php?page=wfw_shortcodes_page1,4193.1239.2529.38
Settings /wp-admin/admin.php?page=wfw_settings_page1,4083.0540.7777.15
Weather Forecast Widget /wp-admin/admin.php?page=wfw_menu_page1,0473.0339.2926.35

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/weather-forecast-widget/admin/partials/weather-forecast-widget-admin-display.php
    • > /wp-content/plugins/weather-forecast-widget/public/partials/weather-forecast-widget-public-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/weather-forecast-widget/admin/partials/weather-forecast-widget-admin-menu-shortcodes.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/weather-forecast-widget/admin/partials/weather-forecast-widget-admin-menu.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/weather-forecast-widget/admin/partials/weather-forecast-widget-admin-menu-settings.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

weather-forecast-widget/weather-forecast-widget.php 92% from 13 tests

The main PHP file in "Weather Forecast Widget" ver. 1.1.5 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected11,005 lines of code in 271 files:
LanguageFilesBlank linesComment linesLines of code
CSS841737,544
PHP173528331,969
PO File2288436928
SVG24000496
JavaScript4117168

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity27.22
▷ Minimum class complexity1.00
▷ Maximum class complexity200.00
Average method complexity4.63
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods65
▷ Static methods23.08%
▷ Public methods4772.31%
▷ Protected methods00.00%
▷ Private methods1827.69%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected