84% allerta-meteo-lombardia-italia

Code Review | Allerta Meteo Lombardia

WordPress plugin Allerta Meteo Lombardia scored84%from 54 tests.

About plugin

  • Plugin page: allerta-meteo-lom...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Aug 17, 2022
  • Number of updates: 24
  • Update frequency: every 92.1 days
  • Top authors: Milmor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,043 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
Install script ran successfully

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

A check of server-side resources used by Allerta Meteo Lombardia
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.08 ▼3.88
Dashboard /wp-admin3.33 ▲0.0348.23 ▼5.48
Posts /wp-admin/edit.php3.38 ▲0.0348.87 ▲1.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0383.53 ▼16.93
Media Library /wp-admin/upload.php3.25 ▲0.0242.96 ▲7.65

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Allerta Meteo Lombardia
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.56 ▼0.741.92 ▼0.0641.13 ▼3.80
Dashboard /wp-admin2,203 ▲185.82 ▲0.75109.73 ▼1.2840.33 ▼1.39
Posts /wp-admin/edit.php2,086 ▼32.04 ▼0.0139.68 ▲2.8036.09 ▼2.70
Add New Post /wp-admin/post-new.php1,531 ▲1723.11 ▲5.61639.52 ▼68.7563.94 ▲9.45
Media Library /wp-admin/upload.php1,391 ▲34.23 ▲0.10102.14 ▼23.3143.85 ▼7.29

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 detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • amli_version_number

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function shortcode_atts() in wp-content/plugins/allerta-meteo-lombardia-italia/class-shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/allerta-meteo-lombardia-italia/allerta-meteo-lombardia-italia.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: meteo, italia, allerta, lombardia

allerta-meteo-lombardia-italia/allerta-meteo-lombardia-italia.php Passed 13 tests

This is the main PHP file of "Allerta Meteo Lombardia" version 1.5.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
77 characters long description:
Visualizzatore di allerte meteo collegato con il portale di Regione Lombardia

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected158 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23013158

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/wpgov.png10.12KB5.20KB▼ 48.64%