10% weather-widget-esotanc-weather

Code Review | Weather Widget - Esotanc Weather

WordPress plugin Weather Widget - Esotanc Weather scored 10% from 54 tests.

About plugin

  • Plugin page: weather-widget-es...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.5
  • WordPress version: 5.8.1
  • First release: Feb 5, 2013
  • Latest release: Feb 24, 2014
  • Number of updates: 23
  • Update frequency: every 16.7 days
  • Top authors: esotanc (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

100+ active / 10,356 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/weather-widget-esotanc-weather/esotanc-weather-widget.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; esotanc_weather_widget has a deprecated constructor

Server metrics [RAM: ▼1.57MB] [CPU: ▼205.68ms] Passed 4 tests

This is a short check of server-side resources used by Weather Widget - Esotanc Weather
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼0.666.87 ▼22.87
Dashboard /wp-admin2.08 ▼0.9710.41 ▼39.82
Posts /wp-admin/edit.php2.08 ▼1.025.76 ▼45.19
Add New Post /wp-admin/post-new.php2.08 ▼3.359.19 ▼682.36
Media Library /wp-admin/upload.php2.08 ▼0.939.26 ▼55.36

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 54 new files
Database: no new tables, 1 new option
New WordPress options
widget_esotanc_weather_widget

Browser metrics Passed 4 tests

Weather Widget - Esotanc Weather: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.28 ▲0.4612.46 ▲2.3555.48 ▲6.17
Dashboard /wp-admin2,970 ▲365.99 ▼0.19156.93 ▼1.68128.06 ▲4.27
Posts /wp-admin/edit.php2,739 ▼02.80 ▲0.1286.11 ▲18.63106.48 ▲7.81
Add New Post /wp-admin/post-new.php1,581 ▼10219.21 ▲0.98420.45 ▼35.73130.38 ▲6.72
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.03191.76 ▲25.07137.73 ▼11.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/weather-widget-esotanc-weather/esotanc-weather-widget.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; esotanc_weather_widget has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_esotanc_weather_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/weather-widget-esotanc-weather/esotanc-weather-widget.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

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

The main PHP script in "Weather Widget - Esotanc Weather" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("weather-widget-esotanc-weather.php" instead of "esotanc-weather-widget.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin401 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP16239350
XML12151

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/kiseso.png1.87KB1.63KB▼ 12.90%
img/zivatar.png2.88KB2.00KB▼ 30.46%
img/onoseso.png2.13KB1.80KB▼ 15.56%
img/zapor.png2.78KB1.95KB▼ 29.87%
img/nefelhos.png1.56KB1.47KB▼ 5.70%