90% covid-19-toscana

Code Review | COVID-19 Toscana

WordPress plugin COVID-19 Toscana scored90%from 54 tests.

About plugin

  • Plugin page: covid-19-toscana
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Sep 29, 2020
  • Number of updates: 9
  • Update frequency: every 5.3 days
  • Top authors: covid19toscana (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /419 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.11MB] [CPU: ▼3.61ms] Passed 4 tests

Server-side resources used by COVID-19 Toscana
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.11 ▼4.25
Dashboard /wp-admin3.43 ▲0.1249.18 ▼8.59
Posts /wp-admin/edit.php3.54 ▲0.1847.37 ▼5.35
Add New Post /wp-admin/post-new.php6.02 ▲0.1496.51 ▲4.92
Media Library /wp-admin/upload.php3.35 ▲0.1239.88 ▲3.75
Per Iniziare /wp-admin/admin.php?page=covid19toscana-start3.3233.79
Impostazioni /wp-admin/admin.php?page=covid19toscana-options3.3237.45

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 9 new options
New WordPress options
graph_options
widget_recent-comments
theysaidso_admin_options
db_upgraded
dataset_url
provence_colors
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for COVID-19 Toscana
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲22314.89 ▲0.3410.29 ▲8.3838.16 ▼6.79
Dashboard /wp-admin2,325 ▲1225.11 ▼0.73104.56 ▼16.7040.41 ▼5.80
Posts /wp-admin/edit.php2,216 ▲1162.30 ▲0.2742.37 ▲5.5936.35 ▼0.73
Add New Post /wp-admin/post-new.php1,564 ▲3823.60 ▲5.98667.35 ▲18.4336.59 ▼20.97
Media Library /wp-admin/upload.php1,510 ▲1104.54 ▲0.3597.74 ▼6.2941.23 ▼2.92
Per Iniziare /wp-admin/admin.php?page=covid19toscana-start1,2641.9027.8549.55
Impostazioni /wp-admin/admin.php?page=covid19toscana-options3,7053.49136.2734.87

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

covid-19-toscana/covid-19-toscana.php Passed 13 tests

Analyzing the main PHP file in "COVID-19 Toscana" version 1.0.1
71 characters long description:
Plug-in per la visualizzazione dei dati COVID-19 della regione Toscana.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected854 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP614214576
JavaScript33510208
CSS116070

PHP code Passed 2 tests

A short review of 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.23
Average class complexity11.50
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.24MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/provincia0.png35.02KB13.00KB▼ 62.87%
assets/confronto1.png37.63KB11.35KB▼ 69.83%
assets/toscana0.png53.74KB18.48KB▼ 65.61%
assets/confronto0.png59.06KB19.39KB▼ 67.18%
assets/toscana1.png33.95KB12.17KB▼ 64.15%