78% woo-fattureincloud

Code Review | WooCommerce Fattureincloud

WordPress plugin WooCommerce Fattureincloud scored78%from 54 tests.

About plugin

  • Plugin page: woo-fattureincloud
  • Plugin version: 2.6.3
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 11, 2017
  • Latest release: Nov 9, 2023
  • Number of updates: 113
  • Update frequency: every 19.5 days
  • Top authors: cristiano.zanca (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

700+ active /22,282 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▲0.70ms] Passed 4 tests

Server-side resources used by WooCommerce Fattureincloud
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0935.45 ▼3.27
Dashboard /wp-admin3.38 ▲0.0750.21 ▼3.20
Posts /wp-admin/edit.php3.50 ▲0.1355.70 ▲8.43
Add New Post /wp-admin/post-new.php5.96 ▲0.0788.55 ▲3.89
Media Library /wp-admin/upload.php3.30 ▲0.0736.63 ▲5.39

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 10 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
fattureincloud_paid
db_upgraded
fattureincloud_send_choice
widget_theysaidso_widget
widget_recent-comments
count_load_time_woo_fattureincloud
widget_recent-posts
fattureincloud_auto_save

Browser metrics Passed 4 tests

An overview of browser requirements for WooCommerce Fattureincloud
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3714.69 ▲0.340.98 ▼0.7641.74 ▼3.08
Dashboard /wp-admin2,215 ▲385.62 ▲0.1291.55 ▼5.4239.02 ▼5.79
Posts /wp-admin/edit.php2,120 ▲171.98 ▼0.0442.29 ▲2.1437.51 ▲2.61
Add New Post /wp-admin/post-new.php1,552 ▲2623.30 ▲0.22687.57 ▲57.3450.86 ▼0.65
Media Library /wp-admin/upload.php1,417 ▲174.15 ▼0.01102.50 ▲1.0148.98 ▲6.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/woo-fattureincloud/inc/conn_curl.php
    • > /wp-content/plugins/woo-fattureincloud/inc/conn_curl_email.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-fattureincloud/inc/refresh.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/woo-fattureincloud/inc/attiva_connessione.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/woo-fattureincloud/inc/vat_number.php:7
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/woo-fattureincloud/inc/conn_curl.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-fattureincloud/inc/connetti.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/woo-fattureincloud/inc/reset_dati_connessione.php:3
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/woo-fattureincloud/inc/conn_curl.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-fattureincloud/inc/put_data.php:3
    • > PHP Notice
      Undefined variable: api_uid in wp-content/plugins/woo-fattureincloud/inc/conn_curl.php on line 8
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/woo-fattureincloud/inc/conn_curl_email.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: fattura, fatture elettroniche, fatture, fatturazione elettronica, cloud...

woo-fattureincloud/woo-fattureincloud.php 92% from 13 tests

Analyzing the main PHP file in "WooCommerce Fattureincloud" version 2.6.3
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected3,165 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP282,6177603,110
CSS17028
JavaScript211127

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.60
▷ Minimum method complexity2.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions3597.22%
▷ Anonymous functions12.78%
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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/image/woo_fattureincloud.png3.19KB2.25KB▼ 29.36%