10% easyweather-widget

Code Review | EasyWeather widget

WordPress plugin EasyWeather widget scored 10% from 54 tests.

About plugin

  • Plugin page: easyweather-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.5
  • WordPress version: 5.8.1
  • First release: Dec 8, 2012
  • Latest release: Dec 15, 2012
  • Number of updates: 52
  • Update frequency: every 0.2 days
  • Top authors: myselfko (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 2,443 total downloads


Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/easyweather-widget/weather.php+11
    Function create_function() is deprecated

Server metrics [RAM: ▼1.77MB] [CPU: ▼188.99ms] Passed 4 tests

A check of server-side resources used by EasyWeather widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.86 ▼0.865.02 ▼23.36
Dashboard /wp-admin1.88 ▼1.187.33 ▼37.35
Posts /wp-admin/edit.php1.88 ▼1.235.67 ▼42.29
Add New Post /wp-admin/post-new.php1.88 ▼3.555.56 ▼651.17
Media Library /wp-admin/upload.php1.88 ▼1.129.73 ▼25.14

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 1 new option
New WordPress options

Browser metrics Passed 4 tests

EasyWeather widget: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.36 ▲0.7810.31 ▲0.3247.24 ▲1.78
Dashboard /wp-admin2,973 ▲395.94 ▼0.26145.34 ▼23.19115.12 ▲11.01
Posts /wp-admin/edit.php2,739 ▼02.85 ▲0.1365.48 ▼0.5288.49 ▼1.43
Add New Post /wp-admin/post-new.php1,683 ▼018.32 ▼0.04435.18 ▼29.22118.70 ▲6.81
Media Library /wp-admin/upload.php1,748 ▼595.01 ▼0.01168.42 ▲1.71130.39 ▲23.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/easyweather-widget/weather.php+11
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_easyweather_widget

Smoke tests 75% from 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 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easyweather-widget/weather.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can take inspiration from this readme.txt

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

The main PHP script in "EasyWeather widget" version 1.0 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("easyweather-widget.php" instead of "weather.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected210 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity4.33
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
No PNG images were found in this plugin