89% weatherzone

Code Review | WeatherZone Embed

WordPress plugin WeatherZone Embed scored 89% from 54 tests.

About plugin

  • Plugin page: weatherzone
  • Plugin version: 1.2.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Jan 13, 2010
  • Latest release: Sep 4, 2020
  • Number of updates: 41
  • Update frequency: every 94.8 days
  • Top authors: jamescollins (87.8%)om4 (14.63%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 5,725 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by WeatherZone Embed
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.29 ▲0.27
Dashboard /wp-admin3.34 ▲0.0252.42 ▼0.33
Posts /wp-admin/edit.php3.39 ▲0.0256.17 ▲2.06
Add New Post /wp-admin/post-new.php5.92 ▲0.0291.54 ▼7.41
Media Library /wp-admin/upload.php3.26 ▲0.0240.08 ▲2.57

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
om4_weatherzone_db_version
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WeatherZone Embed
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲1113.73 ▲0.521.80 ▲0.1042.63 ▲0.22
Dashboard /wp-admin2,200 ▼35.81 ▲0.95108.13 ▲11.0640.51 ▲0.41
Posts /wp-admin/edit.php2,086 ▼62.02 ▲0.0538.26 ▼1.2536.44 ▼0.76
Add New Post /wp-admin/post-new.php1,535 ▲223.63 ▲0.44685.64 ▼20.2356.72 ▲0.98
Media Library /wp-admin/upload.php1,391 ▲94.25 ▲0.0095.78 ▼1.6543.00 ▲0.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • om4_weatherzone_db_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Example current weather and forecast buttons/widgets) image required
You can take inspiration from this readme.txt

weatherzone/weatherzone.php 85% from 13 tests

The main PHP file in "WeatherZone Embed" ver. 1.2.12 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: Please don't use more than 140 characters for the plugin description (currently 141 characters long)

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
No dangerous file extensions were detected113 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14456113

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
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

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.54KB4.86KB▼ 68.72%