68% fattura24

Code Review | Fattura24

WordPress plugin Fattura24 scored68%from 54 tests.

About plugin

  • Plugin page: fattura24
  • Plugin version: 6.2.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: May 20, 2019
  • Latest release: Oct 30, 2023
  • Number of updates: 156
  • Update frequency: every 4.3 days
  • Top authors: davideiandoli (100%)

Code review

54 tests

User reviews

74 reviews

Install metrics

500+ active /42,104 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.42MB] [CPU: ▲260.31ms] 50% from 4 tests

A check of server-side resources used by Fattura24
Please take the time to fix the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 635.77ms on /wp-admin/admin.php?page=fatt-24-api-info)
  • Extra CPU: Extra CPU usage must be kept under 200.00ms (currently 260.31ms on /wp-admin/admin.php?page=fatt-24-app)
PageMemory (MB)CPU Time (ms)
Home /4.60 ▲1.1342.03 ▲4.33
Dashboard /wp-admin4.85 ▲1.55391.74 ▲342.90
Posts /wp-admin/edit.php4.91 ▲1.55392.04 ▲338.07
Add New Post /wp-admin/post-new.php7.40 ▲1.51458.02 ▲355.93
Media Library /wp-admin/upload.php4.71 ▲1.48545.90 ▲513.59
Fattura24 Tax /wp-admin/admin.php?page=fatt-24-tax4.68331.73
Fattura24 /wp-admin/options-general.php?page=fatt-24-settings4.5835.73
VideoGuides /wp-admin/admin.php?page=fatt-24-videos4.68398.42
Warning /wp-admin/admin.php?page=fatt-24-warning4.68324.19
Support /wp-admin/admin.php?page=fatt-24-support4.68350.43
F24 Api Info /wp-admin/admin.php?page=fatt-24-api-info4.68635.77
Mobile App /wp-admin/admin.php?page=fatt-24-app4.68364.29

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 65 new files
Database: 2 new tables, 9 new options
New tables
wp_f24_installation_log
wp_fattura_tax
New WordPress options
theysaidso_admin_options
fatt-24-inv-create
widget_theysaidso_widget
db_upgraded
fatt-24-add-vat-field
can_compress_scripts
recovery_mode_email_last_sent
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Fattura24
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,861 ▲7514.71 ▼0.021.71 ▼0.1339.14 ▼1.22
Dashboard /wp-admin2,262 ▲825.67 ▼0.0291.31 ▼3.6542.99 ▲1.61
Posts /wp-admin/edit.php2,173 ▲702.16 ▲0.1340.87 ▼2.8538.12 ▼1.80
Add New Post /wp-admin/post-new.php1,580 ▲2823.20 ▲5.02657.86 ▲32.5353.20 ▼15.00
Media Library /wp-admin/upload.php1,470 ▲674.23 ▲0.06106.94 ▲7.6049.41 ▲4.26
Fattura24 Tax /wp-admin/admin.php?page=fatt-24-tax1,2042.1924.5533.18
Fattura24 /wp-admin/options-general.php?page=fatt-24-settings550.420.1110.00
VideoGuides /wp-admin/admin.php?page=fatt-24-videos9642.1626.3632.79
Warning /wp-admin/admin.php?page=fatt-24-warning9612.1727.2253.28
Support /wp-admin/admin.php?page=fatt-24-support9502.2028.3630.84
F24 Api Info /wp-admin/admin.php?page=fatt-24-api-info9422.0525.7934.18
Mobile App /wp-admin/admin.php?page=fatt-24-app9252.1926.0727.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_fattura_tax
    • wp_f24_installation_log
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_theysaidso_widget
    • db_upgraded
    • fatt-24-add-vat-field
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_recent-comments
    • fatt-24-inv-create
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=fatt-24-settings
    • > Notice in wp-content/plugins/fattura24/src/settings.php+90
    Trying to get property 'version' of non-object
    • > GET request to /wp-admin/options-general.php?page=fatt-24-settings
    • > Error in wp-content/plugins/fattura24/src/settings.php+92
    Uncaught Error: Call to undefined function fattura24\wc_get_page_id() in wp-content/plugins/fattura24/src/settings.php:92
    Stack trace:
    #0 wp-content/plugins/fattura24/src/admin_scripts.php(52): fattura24\fatt_24_getInfo()
    #1 wp-includes/class-wp-hook.php(310): fattura24\fatt_24_admin_scripts()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin-header.php(118): do_action()
    #5 wp-admin/admin.php(239): require_once('/var/www/wordpr...')
    #6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #7 {main}
    thrown

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=fatt-24-settings
    • > Network (severe)
    wp-admin/options-general.php?page=fatt-24-settings - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: fatture, fatturazione, partita iva, fattura elettronica, codice fiscale

fattura24/fattura24.php 92% from 13 tests

The main PHP script in "Fattura24" version 6.2.9 is automatically included on every request by WordPress
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Everything looks great! No dangerous files found in this plugin7,625 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP381,0551,3926,176
JavaScript129080681
Markdown11670612
CSS295156

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions309
▷ Named functions27689.32%
▷ Anonymous functions3310.68%
Constants86
▷ Global constants86100.00%
▷ Class constants00.00%
▷ Public constants00.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.11MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/logo-small.png0.98KB0.99KB0.00%
assets/logo_orange.png4.35KB3.38KB▼ 22.28%
assets/fattura24tax.png42.77KB15.70KB▼ 63.30%
assets/img_iphone-app.png58.59KB44.17KB▼ 24.61%
assets/android-app.png2.37KB2.37KB0.12%