83% weather-in-any-city-widget

Code Review | Weather Widget Pro

WordPress plugin Weather Widget Pro scored83%from 54 tests.

About plugin

  • Plugin page: weather-in-any-ci...
  • Plugin version: 1.1.28
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.1-6.3
  • WordPress version: 6.3.1
  • First release: Jan 17, 2023
  • Latest release: Aug 17, 2023
  • Number of updates: 51
  • Update frequency: every 4.2 days
  • Top authors: hullcode (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /3,944 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼9.67ms] Passed 4 tests

Server-side resources used by Weather Widget Pro
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1937.92 ▼8.86
Dashboard /wp-admin3.49 ▲0.1545.06 ▼11.52
Posts /wp-admin/edit.php3.54 ▲0.1946.42 ▼1.03
Add New Post /wp-admin/post-new.php6.09 ▲0.2180.75 ▼17.26
Media Library /wp-admin/upload.php3.41 ▲0.1933.29 ▲1.13

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 84 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_wiycw_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Weather Widget Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.61 ▼1.041.60 ▼0.5941.41 ▼17.93
Dashboard /wp-admin2,215 ▲245.87 ▼0.0494.77 ▼2.7138.24 ▼0.83
Posts /wp-admin/edit.php2,095 ▲62.03 ▲0.0334.25 ▼3.1734.12 ▼0.36
Add New Post /wp-admin/post-new.php1,524 ▼923.32 ▲0.13662.00 ▲37.5757.83 ▲5.85
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0294.60 ▼2.4943.31 ▼0.24

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_wiycw_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/weather-in-any-city-widget/weather-in-any-city-widget.php

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Screenshots: Please add descriptions for these screenshots #6, #7 in weather-in-any-city-widget/assets to your readme.txt
  • Contributors: The plugin contributors field is missing
Please take inspiration from this readme.txt

weather-in-any-city-widget/weather-in-any-city-widget.php Passed 13 tests

"Weather Widget Pro" version 1.1.28's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Weather Widget Pro provides a complete weather forecast for any location around the world.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin4,346 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PO File148828962,016
SVG45045986
PHP114711736
JavaScript31190382
CSS2430226

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity14.25
▷ Minimum method complexity1.00
▷ Maximum method complexity39.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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin