89% interconnect-it-weather-widget

Code Review | ICIT Weather Widget

WordPress plugin ICIT Weather Widget scored89%from 54 tests.

About plugin

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /57,019 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼4.32ms] Passed 4 tests

This is a short check of server-side resources used by ICIT Weather Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1945.00 ▲1.79
Dashboard /wp-admin3.50 ▲0.1947.53 ▼5.05
Posts /wp-admin/edit.php3.55 ▲0.1948.37 ▲0.61
Add New Post /wp-admin/post-new.php6.08 ▲0.1996.04 ▼14.18
Media Library /wp-admin/upload.php3.42 ▲0.1938.65 ▲1.34

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_icit_weather_widget
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ICIT Weather Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.58 ▼0.791.83 ▼0.5543.38 ▼0.56
Dashboard /wp-admin2,206 ▲184.87 ▼0.03106.46 ▼0.6041.99 ▼7.34
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0738.89 ▲2.6833.75 ▲1.07
Add New Post /wp-admin/post-new.php1,533 ▼923.51 ▲5.23668.26 ▲61.1268.69 ▲21.36
Media Library /wp-admin/upload.php1,388 ▼34.19 ▼0.0295.26 ▼4.7740.58 ▼3.15

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_icit_weather_widget
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
2 plugin tags: weather, widget

interconnect-it-weather-widget/icit-weather-widget.php 85% from 13 tests

The principal PHP file in "ICIT Weather Widget" v. 2.5.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("interconnect-it-weather-widget.php" instead of "icit-weather-widget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin2,297 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JSON1001,003
PHP2208116823
CSS231210
HTML122204
JavaScript22034
SVG10023

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity130.00
▷ Minimum class complexity130.00
▷ Maximum class complexity130.00
Average method complexity10.21
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods17.14%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png77.24KB21.83KB▼ 71.73%
screenshot-1.png6.60KB4.46KB▼ 32.46%
screenshot-2.png8.66KB5.47KB▼ 36.80%