84% woo-facturadirecta

Code Review | FacturaDirecta (classic) for WooCommerce

WordPress plugin FacturaDirecta (classic) for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-facturadirecta
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9
  • WordPress version: 6.3.1
  • First release: Feb 15, 2018
  • Latest release: Apr 11, 2022
  • Number of updates: 12
  • Update frequency: every 135.9 days
  • Top authors: oscargare (83.33%)facturadirecta (25%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,173 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.33ms] Passed 4 tests

This is a short check of server-side resources used by FacturaDirecta (classic) for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0252.80 ▲10.02
Dashboard /wp-admin3.32 ▼0.0248.16 ▼16.34
Posts /wp-admin/edit.php3.38 ▲0.0251.73 ▲1.46
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.09 ▼9.35
Media Library /wp-admin/upload.php3.25 ▲0.0137.95 ▼1.10

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for FacturaDirecta (classic) for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲5514.21 ▼0.141.79 ▼0.0940.48 ▼4.43
Dashboard /wp-admin2,207 ▲275.59 ▼0.0789.91 ▲0.1241.97 ▲4.04
Posts /wp-admin/edit.php2,113 ▲131.98 ▼0.0036.34 ▼5.0534.04 ▼1.48
Add New Post /wp-admin/post-new.php1,538 ▲323.47 ▲5.42685.97 ▲26.4151.66 ▼11.08
Media Library /wp-admin/upload.php1,415 ▲154.31 ▲0.1296.64 ▼18.8844.98 ▼6.03

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-facturadirecta/includes/wc-facturadirecta-tax-code-validator.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/woo-facturadirecta/includes/wc-facturadirecta-eu-vat-number.php:16

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 errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: facturadirecta, invoices, woocommerce

woo-facturadirecta/woo-facturadirecta.php Passed 13 tests

This is the main PHP file of "FacturaDirecta (classic) for WooCommerce" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
139 characters long description:
WooCommerce integration to your FacturaDirecta billing system. Automatic creation of invoices and customers in your FacturaDirecta account.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected1,006 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6251678986
JavaScript24520

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity31.20
▷ Minimum class complexity4.00
▷ Maximum class complexity81.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods67
▷ Static methods3247.76%
▷ Public methods4465.67%
▷ Protected methods00.00%
▷ Private methods2334.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin