83% woo-redsys-gateway-light

Code Review | WooCommerce Redsys Gateway Light

WordPress plugin WooCommerce Redsys Gateway Light scored83%from 54 tests.

About plugin

  • Plugin page: woo-redsys-gatewa...
  • Plugin version: 5.3.0
  • PHP version: 7.4.16
  • WordPress compatibility: 7.4-6.4
  • WordPress version: 6.3.1
  • First release: Jun 13, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 172
  • Update frequency: every 13.6 days
  • Top authors: j.conti (100%)

Code review

54 tests

User reviews

80 reviews

Install metrics

10,000+ active /185,681 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.05ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Redsys Gateway Light
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.38 ▼8.20
Dashboard /wp-admin3.42 ▲0.0745.25 ▼12.07
Posts /wp-admin/edit.php3.53 ▲0.1744.81 ▲1.92
Add New Post /wp-admin/post-new.php6.00 ▲0.1179.72 ▼5.43
Media Library /wp-admin/upload.php3.34 ▲0.1137.70 ▲1.49
About Redsys /wp-admin/admin.php?page=redsys-about-page3.3130.08

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
woocommerce-redsys-version
theysaidso_admin_options
woocommerce-redsys-rate
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Redsys Gateway Light
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.54 ▲0.191.78 ▼0.5043.72 ▼7.54
Dashboard /wp-admin2,198 ▲245.57 ▲0.0481.82 ▼2.5639.48 ▲2.45
Posts /wp-admin/edit.php2,097 ▼31.97 ▼0.0135.54 ▲1.7534.66 ▼4.75
Add New Post /wp-admin/post-new.php1,526 ▼023.23 ▼0.46747.00 ▲77.9259.06 ▲2.13
Media Library /wp-admin/upload.php1,403 ▼04.23 ▼0.00108.28 ▲3.9846.85 ▲2.63
About Redsys /wp-admin/admin.php?page=redsys-about-page1,4846.4349.5581.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • woocommerce-redsys-rate
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • woocommerce-redsys-version

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 everything seems fine, this is not an exhaustive test

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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/woo-redsys-gateway-light/includes/blocks/wc-gateway-bizum-lite-support.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\WooCommerce\\Blocks\\Payments\\Integrations\\AbstractPaymentMethodType' not found in wp-content/plugins/woo-redsys-gateway-light/includes/blocks/wc-gateway-redsys-lite-support.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/woo-redsys-gateway-light/woocommerce-redsys.php:24

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 86% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

woo-redsys-gateway-light/woocommerce-redsys.php 77% from 13 tests

The primary PHP file in "WooCommerce Redsys Gateway Light" version 5.3.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-redsys-gateway-light.php" instead of "woocommerce-redsys.php")
  • Description: The description should be shorter than 140 characters (currently 164 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("4.0" instead of "7.4")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin7,557 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP284279876,758
SVG100403
CSS320383
XML10012
JavaScript1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity58.00
▷ Minimum class complexity3.00
▷ Maximum class complexity147.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes225.00%
Methods163
▷ Static methods10.61%
▷ Public methods163100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions3288.89%
▷ Anonymous functions411.11%
Constants11
▷ Global constants11100.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
10 PNG files occupy 0.30MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icono-redsys.png10.02KB3.98KB▼ 60.29%
assets/images/second-terminal.png34.42KB11.56KB▼ 66.41%
assets/images/bizum.png4.11KB2.37KB▼ 42.38%
assets/images/redsys.png2.04KB1.28KB▼ 37.37%
assets/images/sequential.png55.21KB18.45KB▼ 66.58%