10% phees-weather-forecast

Code Review | Phee's Weather Forecast

WordPress plugin Phee's Weather Forecast scored10%from 54 tests.

About plugin

  • Plugin page: phees-weather-for...
  • Plugin version: 1.0.0a...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.3.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2016
  • Latest release: Feb 18, 2016
  • Number of updates: 6
  • Update frequency: every 0.8 days
  • Top authors: filipstepanov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /575 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/phees-weather-forecast/includes/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; pwf_widget has a deprecated constructor

Server metrics [RAM: ▼1.87MB] [CPU: ▼55.69ms] Passed 4 tests

A check of server-side resources used by Phee's Weather Forecast
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.00 ▼37.47
Dashboard /wp-admin2.14 ▼1.176.04 ▼43.78
Posts /wp-admin/edit.php2.14 ▼1.225.68 ▼47.57
Add New Post /wp-admin/post-new.php2.14 ▼3.756.42 ▼93.93
Media Library /wp-admin/upload.php2.14 ▼1.106.51 ▼29.80
Phee's Weather Forecast /wp-admin/options-general.php?page=pwf2.146.93

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 9 new options
New WordPress options
pwf_settings
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_pwf-widget
pwf_firsttime_setup
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Phee's Weather Forecast
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▲0.001.83 ▼0.0245.10 ▼2.17
Dashboard /wp-admin2,201 ▲275.63 ▼0.0497.22 ▲2.6543.07 ▼1.06
Posts /wp-admin/edit.php2,109 ▲62.02 ▲0.0636.28 ▲0.5932.24 ▼4.94
Add New Post /wp-admin/post-new.php1,531 ▲323.35 ▲0.29677.48 ▲20.2953.45 ▼3.10
Media Library /wp-admin/upload.php1,400 ▼34.22 ▲0.0797.74 ▼9.4544.62 ▼4.68
Phee's Weather Forecast /wp-admin/options-general.php?page=pwf9381.9927.4631.18

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
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/phees-weather-forecast/includes/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; pwf_widget has a deprecated constructor
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_pwf-widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=pwf
    • > Deprecated in wp-content/plugins/phees-weather-forecast/includes/widget.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; pwf_widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=pwf
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in pwf_widget is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/phees-weather-forecast/includes/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Horizontal view), #2 (Vertical view)
You can take inspiration from this readme.txt

phees-weather-forecast/pwf.php 85% from 13 tests

"Phee's Weather Forecast" version 1.0.0a...'s main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("phees-weather-forecast.php" instead of "pwf.php")
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "1.0.0a...")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected430 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92034341
CSS23489

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity8.50
▷ Minimum class complexity5.00
▷ Maximum class complexity12.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected