78% campi-moduli-italiani

Code Review | Campi Moduli Italiani

WordPress plugin Campi Moduli Italiani scored78%from 54 tests.

About plugin

  • Plugin page: campi-moduli-ital...
  • Plugin version: 2.1.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: May 29, 2020
  • Latest release: Aug 8, 2023
  • Number of updates: 74
  • Update frequency: every 15.8 days
  • Top authors: mociofiletto (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /6,285 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.97ms] Passed 4 tests

A check of server-side resources used by Campi Moduli Italiani
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0045.13 ▲3.33
Dashboard /wp-admin3.31 ▲0.0051.75 ▼1.00
Posts /wp-admin/edit.php3.36 ▲0.0059.33 ▲1.52
Add New Post /wp-admin/post-new.php5.89 ▲0.00110.33 ▲8.64
Media Library /wp-admin/upload.php3.27 ▲0.0441.57 ▲4.02

Server storage [IO: ▲0.61MB] [DB: ▲2.25MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 63 new files
Database: 6 new tables, 6 new options
New tables
wp_gcmi_comuni_soppressi
wp_gcmi_comuni_variazioni
wp_gcmi_codici_catastali
wp_gcmi_stati
wp_gcmi_comuni_attuali
wp_gcmi_stati_cessati
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Campi Moduli Italiani
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.76 ▲0.192.09 ▲0.4358.17 ▲11.98
Dashboard /wp-admin2,189 ▲125.52 ▼0.1396.86 ▲10.7139.96 ▼5.17
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0338.52 ▼5.1135.70 ▼3.42
Add New Post /wp-admin/post-new.php1,526 ▼223.32 ▲0.19687.17 ▲60.4851.44 ▼1.79
Media Library /wp-admin/upload.php1,415 ▲184.19 ▲0.0299.27 ▼2.3541.81 ▼5.04

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/campi-moduli-italiani/modules/comune/class-gcmi-comune.php
    • > /wp-content/plugins/campi-moduli-italiani/admin/class-gcmi-activator.php
    • > /wp-content/plugins/campi-moduli-italiani/campi-moduli-italiani.php
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/campi-moduli-italiani/integrations/wpforms/wpforms-integration.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/campi-moduli-italiani/settings.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campi-moduli-italiani/modules/formsign/wpcf7-formsign-formtag.php:22
    • > PHP Warning
      Use of undefined constant GCMI_USE_STATO - assumed 'GCMI_USE_STATO' (this will throw an Error in a future version of PHP) in wp-content/plugins/campi-moduli-italiani/integrations/contact-form-7/contact-form-7-integrations.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/campi-moduli-italiani/modules/comune/comune-shortcode.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WPForms_Field' not found in wp-content/plugins/campi-moduli-italiani/modules/stato/class-wpforms-field-stato.php:22
    • > PHP Warning
      Use of undefined constant GCMI_USE_CF - assumed 'GCMI_USE_CF' (this will throw an Error in a future version of PHP) in wp-content/plugins/campi-moduli-italiani/integrations/contact-form-7/contact-form-7-integrations.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campi-moduli-italiani/includes/cron.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/campi-moduli-italiani/modules/comune/wpcf7-comune-formtag.php:9
    • > PHP Warning
      require_once(GCMI_PLUGIN_DIR/admin/includes/help-tabs.php): failed to open stream: No such file or directory in wp-content/plugins/campi-moduli-italiani/admin/admin.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 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
6 plugin tags: contact form 7, firma digitale, comuni italiani, codice fiscale, multisite...

campi-moduli-italiani/campi-moduli-italiani.php 92% from 13 tests

"Campi Moduli Italiani" version 2.1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 789 characters long)

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
Success! There were no dangerous files found in this plugin7,502 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PHP339192,4746,078
PO File1201329519
JavaScript6248435
CSS64263336
HTML1538105
JSON40029

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity42.40
▷ Minimum class complexity1.00
▷ Maximum class complexity147.00
Average method complexity5.41
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods143
▷ Static methods6041.96%
▷ Public methods12386.01%
▷ Protected methods85.59%
▷ Private methods128.39%
Functions60
▷ Named functions4981.67%
▷ Anonymous functions1118.33%
Constants25
▷ Global constants1976.00%
▷ Class constants624.00%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/icon.png0.76KB0.48KB▼ 36.42%
img/gcmi_info.png2.58KB1.88KB▼ 27.05%