83% woocommerce-sermepa-payment-gateway

Code Review | WooCommerce Sermepa payment gateway

WordPress plugin WooCommerce Sermepa payment gateway scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-serme...
  • Plugin version: 1.2.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.4
  • WordPress version: 6.3.1
  • First release: May 1, 2013
  • Latest release: Jun 24, 2020
  • Number of updates: 61
  • Update frequency: every 42.8 days
  • Top authors: jesusangel.delpozo (100%)

Code review

54 tests

User reviews

25 reviews

Install metrics

1,000+ active /30,088 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.80ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Sermepa payment gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1437.38 ▲2.21
Dashboard /wp-admin3.45 ▲0.1042.03 ▼16.10
Posts /wp-admin/edit.php3.56 ▲0.2043.26 ▲0.81
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.56 ▲4.92
Media Library /wp-admin/upload.php3.37 ▲0.1431.26 ▼2.13

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Sermepa payment gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.34 ▲0.191.87 ▲0.2636.80 ▼0.54
Dashboard /wp-admin2,201 ▲275.54 ▼0.0489.56 ▲0.7937.93 ▼5.40
Posts /wp-admin/edit.php2,085 ▼181.97 ▲0.0137.32 ▲2.6133.61 ▼1.27
Add New Post /wp-admin/post-new.php1,543 ▲1718.12 ▼5.12630.82 ▲23.9666.32 ▲10.69
Media Library /wp-admin/upload.php1,403 ▲64.21 ▼0.0598.40 ▲3.2741.24 ▲0.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • 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
Everything seems fine, however 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 fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woocommerce-sermepa-payment-gateway/wc_redsys_payment_gateway.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% 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 require attention:
  • Screenshots: Please add images for these screenshots: #1 (The slick WooCommerce settings panel), #2 (WooCommerce products admin), #3 (WooCommerce sales reports)
The official readme.txt is a good inspiration

woocommerce-sermepa-payment-gateway/wc_redsys_payment_gateway.php 85% from 13 tests

The main PHP file in "WooCommerce Sermepa payment gateway" ver. 1.2.10 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woocommerce-sermepa-payment-gateway.php" instead of "wc_redsys_payment_gateway.php")
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 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 plugin910 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1130182694
PO File185129216

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity99.00
▷ Minimum class complexity99.00
▷ Maximum class complexity99.00
Average method complexity5.45
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/redsys.png2.16KB1.82KB▼ 16.03%