84% clima-widget

Code Review | Clima-Widget

WordPress plugin Clima-Widget scored84%from 54 tests.

About plugin

  • Plugin page: clima-widget
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-5.8.1
  • WordPress version: 6.3.1
  • First release: Sep 18, 2021
  • Latest release: Sep 21, 2021
  • Number of updates: 3
  • Update frequency: every 1.3 days
  • Top authors: danielogo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,647 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.64ms] Passed 4 tests

An overview of server-side resources used by Clima-Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0948.75 ▲12.06
Dashboard /wp-admin3.39 ▲0.0845.40 ▼3.57
Posts /wp-admin/edit.php3.50 ▲0.1445.45 ▼2.18
Add New Post /wp-admin/post-new.php5.99 ▲0.1084.45 ▼24.72
Media Library /wp-admin/upload.php3.31 ▲0.0834.60 ▼0.07

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_clima_widget_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Clima-Widget
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.61 ▼0.776.29 ▲4.6245.68 ▲2.64
Dashboard /wp-admin2,210 ▲255.86 ▲0.0894.13 ▼7.0540.31 ▼0.64
Posts /wp-admin/edit.php2,075 ▲42.02 ▼0.0235.19 ▼2.8232.38 ▼1.41
Add New Post /wp-admin/post-new.php1,527 ▲818.28 ▼4.96618.81 ▲11.8562.46 ▲9.89
Media Library /wp-admin/upload.php1,392 ▲14.15 ▼0.0393.85 ▼4.9440.39 ▼1.67

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
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_clima_widget_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/clima-widget/admin/partials/clima-widget-admin-display.php
    • > /wp-content/plugins/clima-widget/public/partials/clima-widget-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes: You can take inspiration from this readme.txt

clima-widget/clima-widget.php Passed 13 tests

"Clima-Widget" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
79 characters long description:
Beautiful, free and SEO friendly weather forecast widget (Spanish and English).

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
There were no executable files found in this plugin1,084 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
CSS21208477
PHP12147548387
JavaScript24957184
SVG40036

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.25
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.96
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin