89% weather-map-widget

Code Review | Ventus - Weather Map Widget & Shortcode

WordPress plugin Ventus - Weather Map Widget & Shortcode scored89%from 54 tests.

About plugin

  • Plugin page: weather-map-widget
  • Plugin version: 1.5.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Aug 10, 2019
  • Latest release: Feb 25, 2023
  • Number of updates: 22
  • Update frequency: every 61.9 days
  • Top authors: davidmatthew (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /18,032 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.14MB] [CPU: ▼2.72ms] Passed 4 tests

Analyzing server-side resources used by Ventus - Weather Map Widget & Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1435.51 ▼5.68
Dashboard /wp-admin3.44 ▲0.1443.66 ▼3.34
Posts /wp-admin/edit.php3.55 ▲0.2047.80 ▲0.79
Add New Post /wp-admin/post-new.php6.02 ▲0.1489.84 ▼2.65
Media Library /wp-admin/upload.php3.36 ▲0.1335.69 ▲2.47

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Ventus - Weather Map Widget & Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲6713.30 ▼1.081.64 ▼0.2239.43 ▼10.80
Dashboard /wp-admin2,211 ▲265.88 ▲1.00110.59 ▲6.8145.79 ▲1.09
Posts /wp-admin/edit.php2,091 ▲22.04 ▲0.0139.91 ▼0.9035.63 ▲2.74
Add New Post /wp-admin/post-new.php1,530 ▼1223.42 ▲4.94660.34 ▲63.4252.45 ▼9.33
Media Library /wp-admin/upload.php1,390 ▲24.25 ▲0.0494.67 ▼4.0640.12 ▼3.89

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_weather-map
    • widget_theysaidso_widget
    • 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: weather, ventus, windy, weather forecast, forecast...

weather-map-widget/weather-map.php 85% from 13 tests

"Ventus - Weather Map Widget & Shortcode" version 1.5.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("weather-map-widget.php" instead of "weather-map.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin888 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PO File4219241504
PHP570149361
CSS15023

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity44.33
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity11.83
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected