74% wp-facturaone

Code Review | FacturaONE para WooCommerce

WordPress plugin FacturaONE para WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: wp-facturaone
  • Plugin version: 3.13
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Nov 9, 2019
  • Latest release: Nov 22, 2023
  • Number of updates: 323
  • Update frequency: every 4.6 days
  • Top authors: facturaone (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,454 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.56MB] [CPU: ▲4.82ms] 75% from 4 tests

Analyzing server-side resources used by FacturaONE para WooCommerce
Please fix the following
  • CPU: Try to keep total CPU usage under 500.00ms (currently 523.69ms on /wp-admin/admin.php?page=WPFacturaOne)
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6145.62 ▲7.57
Dashboard /wp-admin3.90 ▲0.5952.34 ▲1.00
Posts /wp-admin/edit.php3.95 ▲0.5952.82 ▲3.99
Add New Post /wp-admin/post-new.php6.42 ▲0.53102.89 ▲18.97
Media Library /wp-admin/upload.php3.76 ▲0.5240.18 ▲6.70
FacturaONE /wp-admin/admin.php?page=WPFacturaOne4.29523.69

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 36 new files
Database: 1 new table, 16 new options
New tables
wp_fone_item_clients
New WordPress options
FacturaONE_pers_agotado
can_compress_scripts
FacturaONE_preciosusuariosregistrados
FacturaONE_version
theysaidso_admin_options
FONE_OcultaProductosNOIMAGEN
FacturaONE_backorder_message
FacturaONE_updatedver
widget_recent-comments
FacturaONE_conexionSSL
...

Browser metrics Passed 4 tests

A check of browser resources used by FacturaONE para WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲3014.23 ▼0.181.70 ▲0.0643.00 ▲3.76
Dashboard /wp-admin2,197 ▲235.62 ▼0.0293.15 ▼6.2334.26 ▼11.30
Posts /wp-admin/edit.php2,102 ▲21.94 ▼0.0939.58 ▼3.3730.86 ▼5.98
Add New Post /wp-admin/post-new.php1,538 ▲1223.24 ▲0.08666.50 ▲61.7854.81 ▲4.29
Media Library /wp-admin/upload.php1,402 ▼14.15 ▼0.0798.15 ▼3.1239.68 ▼4.19
FacturaONE /wp-admin/admin.php?page=WPFacturaOne1,5012.4841.4135.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_fone_item_clients
  • The uninstall procedure has failed, leaving 16 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • FacturaONE_pers_agotado
    • widget_recent-comments
    • FacturaONE_updatedver
    • widget_recent-posts
    • FacturaONE_preciosusuariosregistrados
    • FacturaONE_version
    • FacturaONE_ajax_cicle
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-facturaone/FONE_custom_products.php:3
    • > PHP Notice
      Undefined index: action in wp-content/plugins/wp-facturaone/update_stock.php on line 64
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-facturaone/FONE_custom_users.php:3
    • > PHP Notice
      Undefined index: action in wp-content/plugins/wp-facturaone/update_stock.php on line 79
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-facturaone/FONE_custom_tarifas.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-facturaone/FONE_subcategories.php:2
    • > PHP Notice
      Undefined index: action in wp-content/plugins/wp-facturaone/update_users.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/wp-facturaone/class-tgm-plugin-activation.php:2110
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-facturaone/FONE_custom_products.php:3
    • > PHP Notice
      Undefined index: action in wp-content/plugins/wp-facturaone/update_users.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Contributors: Plugin contributors field is missing
The official readme.txt might help

wp-facturaone/wp-facturaone.php Passed 13 tests

The main file in "FacturaONE para WooCommerce" v. 3.13 serves as a complement to information provided in readme.txt and as the entry point to the plugin
82 characters long description:
La forma más fácil de trabajar con tu tienda online desde nuestro ERP FACTURAONE

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected9,191 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP189122,3545,988
JavaScript64971872,045
CSS45051,158

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity36.20
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods124
▷ Static methods54.03%
▷ Public methods10181.45%
▷ Protected methods2318.55%
▷ Private methods00.00%
Functions142
▷ Named functions14199.30%
▷ Anonymous functions10.70%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.35MB with 0.23MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/plug_image.png170.97KB40.48KB▼ 76.32%
assets/plugimage.png170.97KB40.48KB▼ 76.32%
assets/btncancel.png5.79KB2.72KB▼ 53.04%
assets/icon-256x256.png10.66KB4.93KB▼ 53.79%