83% rvcfdi-para-woocommerce

Code Review | RVCFDI para Woocommerce

WordPress plugin RVCFDI para Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: rvcfdi-para-wooco...
  • Plugin version: 8.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.3-6.2
  • WordPress version: 6.3.1
  • First release: Apr 20, 2017
  • Latest release: May 31, 2023
  • Number of updates: 543
  • Update frequency: every 4.1 days
  • Top authors: realvirtualmx (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /9,949 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼8.46ms] Passed 4 tests

Analyzing server-side resources used by RVCFDI para Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0933.32 ▼3.01
Dashboard /wp-admin3.40 ▲0.0544.32 ▼15.47
Posts /wp-admin/edit.php3.45 ▲0.0945.41 ▲0.90
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.59 ▼13.46
Media Library /wp-admin/upload.php3.34 ▲0.1132.68 ▼1.88

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 73 new options
New WordPress options
rvcfdi_emailNotificacionErrorModuloClientes
rvcfdi_config_principal_shipping
rvcfdi_complementoCFDI_iedu_configuracion_nivel
rvcfdi_descripcion
rvcfdi_serie
rvcfdi_color_texto_boton_generarcfdi
rvcfdi_rfcEmisor
rvcfdi_informacionGlobal_año
rvcfdi_estado_orden
rvcfdi_claveEmisor
...

Browser metrics Passed 4 tests

Checking browser requirements for RVCFDI para Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.42 ▼1.247.71 ▲6.1141.47 ▲1.43
Dashboard /wp-admin2,206 ▲265.68 ▲0.0883.37 ▼1.8036.49 ▼8.04
Posts /wp-admin/edit.php2,114 ▲142.01 ▲0.0340.51 ▲3.4736.39 ▲2.35
Add New Post /wp-admin/post-new.php1,549 ▲2323.22 ▼0.16664.79 ▼7.4537.83 ▼30.22
Media Library /wp-admin/upload.php1,414 ▲114.23 ▲0.0696.34 ▲0.9643.83 ▼3.32

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 73 options in the database
    • rvcfdi_descripcion
    • rvcfdi_serie
    • rvcfdi_clave_unidad_shipping
    • rvcfdi_estado_orden_cfdi_automatico
    • rvcfdi_pedido_mes_actual
    • rvcfdi_numero_pedimento
    • rvcfdi_color_texto_controles_formulario
    • rvcfdi_notificar_error_cfdi_automatico
    • rvcfdi_idioma
    • rvcfdi_informacionGlobal_meses
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rvcfdi-para-woocommerce/realvirtual_woocommerce.php:47

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: You can take inspiration from this readme.txt

rvcfdi-para-woocommerce/realvirtual_woocommerce.php 85% from 13 tests

"RVCFDI para Woocommerce" version 8.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")
  • Main file name: Name the main plugin file the same as the plugin slug ("rvcfdi-para-woocommerce.php" instead of "realvirtual_woocommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin26,020 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP123,15359722,614
JavaScript35701192,879
CSS26835527

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 124)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity53.64
▷ Minimum class complexity3.00
▷ Maximum class complexity396.00
Average method complexity12.35
▷ Minimum method complexity1.00
▷ Maximum method complexity124.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods51
▷ Static methods5098.04%
▷ Public methods51100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions86
▷ Named functions86100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
25 PNG files occupy 0.30MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
imagenes/guia2.png38.66KB13.48KB▼ 65.13%
assets/realvirtual_woocommerce_envioxml_img.png9.66KB4.44KB▼ 54.08%
assets/realvirtual_woocommerce_enviar.png0.74KB0.83KB0.00%
assets/realvirtual_woocommerce_acuse.png1.34KB1.34KB0.22%
assets/realvirtual_woocommerce.png0.83KB0.72KB▼ 13.16%