89% visualcrossing-weather-forecast

Code Review | Visual Crossing Weather Forecast

WordPress plugin Visual Crossing Weather Forecast scored89%from 54 tests.

About plugin

  • Plugin page: visualcrossing-we...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.2
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Sep 28, 2022
  • Number of updates: 16
  • Update frequency: every 49.6 days
  • Top authors: srhelwig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /858 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by Visual Crossing Weather Forecast
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.34 ▼9.61
Dashboard /wp-admin3.32 ▼0.0348.37 ▼13.21
Posts /wp-admin/edit.php3.37 ▲0.0147.18 ▼5.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.05 ▼5.10
Media Library /wp-admin/upload.php3.24 ▲0.0136.63 ▼1.33
Weather Forecast Settings /wp-admin/options-general.php?page=visualcrossingwfcst3.2138.32

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Visual Crossing Weather Forecast
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,865 ▲11914.20 ▼0.207.76 ▲5.8339.71 ▼2.80
Dashboard /wp-admin2,213 ▲285.85 ▼0.05100.84 ▼14.9039.66 ▼3.79
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0039.27 ▲2.6834.16 ▲0.07
Add New Post /wp-admin/post-new.php1,517 ▼1117.66 ▼5.55689.77 ▼10.7350.72 ▼5.23
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.19101.97 ▼7.3743.95 ▲1.04
Weather Forecast Settings /wp-admin/options-general.php?page=visualcrossingwfcst1,0782.0425.4163.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "Visual Crossing Weather Forecast" version 1.0.0
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin1,287 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3177107601
PHP4132146455
CSS12912169
PO File1497562

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity20.00
▷ Minimum class complexity14.00
▷ Maximum class complexity26.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods315.00%
▷ Public methods1995.00%
▷ Protected methods15.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icon-34.png2.18KB1.29KB▼ 40.89%
assets/images/logo.png5.63KB2.01KB▼ 64.24%