73% weather-master

Code Review | TechGasp Weather Master

WordPress plugin TechGasp Weather Master scored73%from 54 tests.

About plugin

  • Plugin page: weather-master
  • Plugin version: 5.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.7
  • WordPress version: 6.3.1
  • First release: Apr 29, 2014
  • Latest release: Mar 10, 2021
  • Number of updates: 47
  • Update frequency: every 53.3 days
  • Top authors: TechGasp (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

200+ active /36,395 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼3.11ms] Passed 4 tests

Analyzing server-side resources used by TechGasp Weather Master
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.38 ▼3.25
Dashboard /wp-admin3.37 ▲0.0648.50 ▼1.52
Posts /wp-admin/edit.php3.42 ▲0.0647.76 ▼0.79
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.85 ▼6.86
Media Library /wp-admin/upload.php3.29 ▲0.0645.49 ▲8.92
Add-ons /wp-admin/admin.php?page=weather-master-admin-addons3.3234.85
Weather Master /wp-admin/admin.php?page=weather-master3.2735.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
widget_weather_master_widget_fast
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

TechGasp Weather Master: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8013.30 ▼0.991.66 ▼0.2143.71 ▼1.57
Dashboard /wp-admin2,220 ▲324.93 ▼0.89141.98 ▲24.1680.15 ▲39.44
Posts /wp-admin/edit.php2,118 ▲262.02 ▼0.0838.47 ▲1.1039.17 ▲3.62
Add New Post /wp-admin/post-new.php1,536 ▲217.46 ▼5.94693.53 ▲28.7359.97 ▼5.27
Media Library /wp-admin/upload.php1,414 ▲234.17 ▼0.04104.83 ▼21.6359.16 ▲13.02
Add-ons /wp-admin/admin.php?page=weather-master-admin-addons1,1462.0527.3640.19
Weather Master /wp-admin/admin.php?page=weather-master1,1925.52148.3345.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_weather_master_widget_fast
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weather-master
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+204
    Undefined offset: 0
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weather-master
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+205
    Trying to get property 'guid' of non-object
  • 16 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weather-master
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+221
    Trying to get property 'ID' of non-object
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=weather-master
    • > POST request to /wp-cron.php?doing_wp_cron=1696658530.1360850334167480468750
    • > Notice in wp-content/plugins/pressforward/Core/Utility/Retrieval.php+222
    Trying to get property 'post_title' of non-object

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
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/weather-master/includes/weather-master-admin-addons-table.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/weather-master/weather-master.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/weather-master/includes/weather-master-admin-table-header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/weather-master/includes/weather-master-widget-ow-fast.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/weather-master/includes/weather-master-admin-addons.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_path() in wp-content/plugins/weather-master/includes/weather-master-admin-table-news.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_multisite() in wp-content/plugins/weather-master/includes/weather-master-admin.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=weather-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=weather-master
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
Please take inspiration from this readme.txt

weather-master/weather-master.php Passed 13 tests

The principal PHP file in "TechGasp Weather Master" v. 5.1.6 is loaded by WordPress automatically on each request
98 characters long description:
TechGasp Weather Master is the heavy duty, professional wordpress weather plugin. Just like on TV.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin444 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP82862444

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.20
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods9
▷ Static methods222.22%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
9 PNG files occupy 0.28MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/techgasp-hr.png0.94KB0.13KB▼ 86.60%
images/techgasp-admin-addons-updater.png14.03KB13.02KB▼ 7.21%
images/techgasp-minilogo-16.png1.86KB0.92KB▼ 50.87%
images/techgasp-check-no.png21.14KB7.14KB▼ 66.23%
images/techgasp-check-yes.png22.22KB7.59KB▼ 65.83%