78% citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce

Code Review | Città italiane e cap codice di avviamento postale for Woocommerce

WordPress plugin Città italiane e cap codice di avviamento postale for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: citta-italiane-e-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0.1
  • WordPress version: 6.3.1
  • First release: May 7, 2022
  • Latest release: Jan 26, 2023
  • Number of updates: 17
  • Update frequency: every 15.5 days
  • Top authors: 4wpbari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /836 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
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Città italiane e cap codice di avviamento postale for Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.42 ▼2.11
Dashboard /wp-admin3.33 ▲0.0249.57 ▼2.77
Posts /wp-admin/edit.php3.38 ▲0.0254.63 ▲3.25
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.37 ▼5.38
Media Library /wp-admin/upload.php3.25 ▲0.0236.86 ▼3.19

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Città italiane e cap codice di avviamento postale for Woocommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▼0.071.62 ▼0.3142.29 ▼6.07
Dashboard /wp-admin2,195 ▲245.59 ▲0.0285.38 ▼17.8042.39 ▼4.73
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0137.83 ▲3.6935.19 ▼3.57
Add New Post /wp-admin/post-new.php1,526 ▼023.01 ▼0.42690.10 ▼4.3552.46 ▼1.15
Media Library /wp-admin/upload.php1,400 ▼04.16 ▲0.0396.65 ▼9.8544.06 ▲0.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/italy-city-and-postcode-for-woocommerce.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/cities-nozipcode/IT.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/cities-withzipcode/IT.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/field_fraction.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/class.icapfw-woo.settings.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/states/IT.php:13

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 uses markdown syntax to describe your plugin to the world
6 plugin tags: dropdown, codice avviamento postale, cap, city, select...

citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce/italy-city-and-postcode-for-woocommerce.php 85% from 13 tests

The main PHP file in "Città italiane e cap codice di avviamento postale for Woocommerce" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("citta-italiane-e-cap-codice-di-avviamento-postale-for-woocommerce.php" instead of "italy-city-and-postcode-for-woocommerce.php")
  • 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

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
Good job! No executable or dangerous file extensions detected16,878 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP71027816,710
JavaScript13710168

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.00
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.89
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods19
▷ Static methods842.11%
▷ Public methods1894.74%
▷ Protected methods15.26%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected