84% wp-forecast-weather

Code Review | WP Forecast Weather

WordPress plugin WP Forecast Weather scored84%from 54 tests.

About plugin

  • Plugin page: wp-forecast-weather
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 15, 2014
  • Latest release: Sep 25, 2014
  • Number of updates: 17
  • Update frequency: every 0.7 days
  • Top authors: blackrebel (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,252 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▲0.44ms] Passed 4 tests

A check of server-side resources used by WP Forecast Weather
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.86 ▲4.61
Dashboard /wp-admin3.32 ▲0.0245.91 ▼0.51
Posts /wp-admin/edit.php3.37 ▲0.0248.02 ▼0.96
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.33 ▲2.31
Media Library /wp-admin/upload.php3.24 ▲0.0133.97 ▲0.92

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WP Forecast Weather: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5613.22 ▼1.321.71 ▲0.0545.14 ▲3.09
Dashboard /wp-admin2,206 ▲175.91 ▲0.96106.63 ▲3.1541.90 ▼0.36
Posts /wp-admin/edit.php2,086 ▼02.02 ▲0.0440.43 ▲2.6934.39 ▲1.79
Add New Post /wp-admin/post-new.php1,519 ▼1023.35 ▲5.00729.45 ▲64.2160.34 ▲2.39
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0694.21 ▼7.0640.19 ▼1.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-forecast-weather/fw.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (https://github.com/TurnereManager/Forecast-Weather/blob/master/inline.png), #2 (https://github.com/TurnereManager/Forecast-Weather/blob/master/forecast.PNG), #3 (https://github.com/TurnereManager/Forecast-Weather/blob/master/thumbnail.png)
The official readme.txt is a good inspiration

wp-forecast-weather/fw.php 92% from 13 tests

This is the main PHP file of "WP Forecast Weather" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-forecast-weather.php" instead of "fw.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin617 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS2045389
SVG100153
PHP27870
Markdown1305

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.13
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ 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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
thumbnail.png5.88KB2.58KB▼ 56.18%
forecast.PNG4.68KB2.78KB▼ 40.57%
inline.png24.22KB10.22KB▼ 57.82%