52% easy-fattura-elettronica-free

Code Review | Easy Fattura Elettronica FREE

WordPress plugin Easy Fattura Elettronica FREE scored52%from 54 tests.

About plugin

  • Plugin page: easy-fattura-elet...
  • Plugin version: 1.6.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Jul 5, 2023
  • Number of updates: 138
  • Update frequency: every 11.6 days
  • Top authors: webrook (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

200+ active /9,201 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼6.31ms] Passed 4 tests

Analyzing server-side resources used by Easy Fattura Elettronica FREE
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4444.87 ▲3.40
Dashboard /wp-admin3.74 ▲0.3951.30 ▼11.82
Posts /wp-admin/edit.php3.85 ▲0.5051.98 ▼0.64
Add New Post /wp-admin/post-new.php6.35 ▲0.4687.10 ▼16.19
Media Library /wp-admin/upload.php3.66 ▲0.4341.87 ▲4.74
Documenti /wp-admin/admin.php?page=easy-fattura-elettronica-documents3.6337.25
Rubrica intermediari /wp-admin/admin.php?page=easy-fattura-elettronica-intermediari3.6336.80
Passa a PRO /wp-admin/admin.php?page=easy-fattura-elettronica-passa-a-pro3.6333.91
Backup /wp-admin/admin.php?page=easy-fattura-elettronica-backup3.6335.03
Impostazioni /wp-admin/admin.php?page=easy-fattura-elettronica-settings3.6336.42
Invia Fatture /wp-admin/admin.php?page=easy-fattura-elettronica-app4.4054.05

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 480 new files
Database: 2 new tables, 18 new options
New tables
wp_easy_fattura_elettronica_intermediari
wp_easy_fattura_elettronica
New WordPress options
widget_recent-comments
efe-delete-options
efe-license
efe-counter-fattura
efe-token
efe-fatturazione-elettronica-abilitata
efe-counter-ricevuta
widget_theysaidso_widget
efe-pi-cf-abilitati
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Easy Fattura Elettronica FREE
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21013.92 ▼0.479.61 ▲7.5932.81 ▼11.75
Dashboard /wp-admin2,263 ▲575.83 ▲0.93103.13 ▼6.9640.52 ▼0.39
Posts /wp-admin/edit.php2,148 ▲482.01 ▼0.0137.95 ▲0.4736.52 ▼1.13
Add New Post /wp-admin/post-new.php1,566 ▲2622.69 ▲4.50672.34 ▲21.9452.80 ▼4.33
Media Library /wp-admin/upload.php1,451 ▲514.23 ▼0.01105.36 ▼10.2544.82 ▼6.45
Documenti /wp-admin/admin.php?page=easy-fattura-elettronica-documents8452.0524.3032.06
Rubrica intermediari /wp-admin/admin.php?page=easy-fattura-elettronica-intermediari9392.0222.0133.09
Passa a PRO /wp-admin/admin.php?page=easy-fattura-elettronica-passa-a-pro1,0502.1324.5638.54
Backup /wp-admin/admin.php?page=easy-fattura-elettronica-backup9671.9327.1234.76
Impostazioni /wp-admin/admin.php?page=easy-fattura-elettronica-settings8792.1731.3835.67
Invia Fatture /wp-admin/admin.php?page=easy-fattura-elettronica-app8452.0527.7731.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_easy_fattura_elettronica
    • wp_easy_fattura_elettronica_intermediari
  • This plugin does not fully uninstall, leaving 18 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • efe-tipo-documento-fatture
    • efe-fatturazione-elettronica-abilitata
    • efe-token
    • efe-delete-options
    • efe-license
    • efe-counter-fattura
    • efe-pi-cf-abilitati
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=easy-fattura-elettronica-documents
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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 fix the following
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-fattura-elettronica-free/lib/phpqrcode/index.php
    • > /wp-content/plugins/easy-fattura-elettronica-free/admin/partials/easy-fattura-elettronica-admin-display.php
    • > /wp-content/plugins/easy-fattura-elettronica-free/public/partials/easy-fattura-elettronica-public-display.php
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: efe_nome_ditta_fornitore in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 37
    • > PHP Notice
      Undefined variable: store_country in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 32
    • > PHP Notice
      Undefined variable: ispec in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function convert() in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php:40
    • > PHP Notice
      Undefined variable: praz in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 14
    • > PHP Notice
      Undefined variable: efe_codice_fornitore in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 33
    • > PHP Notice
      Undefined variable: fatt_id in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-api.php:3
    • > PHP Notice
      Undefined variable: soggetto in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 9
    • > PHP Notice
      Undefined variable: efe_cf_fornitore in wp-content/plugins/easy-fattura-elettronica-free/includes/easy-fattura-elettronica-template-xml.php on line 35

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

easy-fattura-elettronica-free/easy-fattura-elettronica.php 85% from 13 tests

The main PHP script in "Easy Fattura Elettronica FREE" version 1.6.4 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-fattura-elettronica-free.php" instead of "easy-fattura-elettronica.php")

Code Analysis 5% from 3 tests

File types 0% from 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
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/easy-fattura-elettronica-free/lib/phpqrcode/tools/merge.bat
9,159 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP351,9683,3718,914
JavaScript4467122
PO File230084
CSS331335
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity26.90
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.73
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes42
▷ Abstract classes00.00%
▷ Concrete classes42100.00%
▷ Final classes00.00%
Methods399
▷ Static methods13433.58%
▷ Public methods29172.93%
▷ Protected methods9624.06%
▷ Private methods123.01%
Functions41
▷ Named functions4097.56%
▷ Anonymous functions12.44%
Constants104
▷ Global constants104100.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
58 PNG files occupy 0.14MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/img2.png6.03KB3.82KB▼ 36.73%
admin/css/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
lib/phpqrcode/cache/frame_40.png0.26KB0.24KB▼ 7.87%
lib/phpqrcode/cache/frame_34.png0.25KB0.23KB▼ 8.59%
lib/phpqrcode/cache/frame_23.png0.21KB0.20KB▼ 8.18%