83% e-transactions-wc

Code Review | Up2pay e-Transactions WooCommerce Payment Gateway

WordPress plugin Up2pay e-Transactions WooCommerce Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: e-transactions-wc
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Feb 6, 2020
  • Latest release: May 23, 2023
  • Number of updates: 63
  • Update frequency: every 19.1 days
  • Top authors: paybox (84.13%)prestamodule (17.46%)

Code review

54 tests

User reviews

8 reviews

Install metrics

5,000+ active /32,771 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by Up2pay e-Transactions WooCommerce Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0046.98 ▲3.72
Dashboard /wp-admin3.31 ▼0.0451.84 ▼14.11
Posts /wp-admin/edit.php3.36 ▲0.0048.25 ▲0.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.53 ▼16.97
Media Library /wp-admin/upload.php3.23 ▲0.0036.02 ▼2.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Up2pay e-Transactions WooCommerce Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.38 ▼0.201.72 ▼0.2743.14 ▼1.77
Dashboard /wp-admin2,198 ▲185.65 ▼0.2296.79 ▲6.1841.70 ▲1.95
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0636.09 ▼0.1034.82 ▼3.82
Add New Post /wp-admin/post-new.php1,545 ▼123.09 ▼0.18639.65 ▲22.8454.33 ▲1.64
Media Library /wp-admin/upload.php1,403 ▲34.23 ▼0.0297.85 ▼5.1646.01 ▼1.00

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Etransactions_Abstract_Gateway' not found in wp-content/plugins/e-transactions-wc/class/wc-etransactions-threetime-gateway.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/e-transactions-wc/class/wc-etransactions-abstract-gateway.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Etransactions_Abstract_Gateway' not found in wp-content/plugins/e-transactions-wc/class/wc-etransactions-standard-gateway.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid url: "none"
  • Screenshots: These screenshots do not have images: #1 (The administration panel: payment configuration), #2 (The administration panel: Up2pay e-Transactions Account parameters), #3 (The Checkout page: Payment method choice (1/ 3 times)), #4 (The Payment Means choice (hosted at Up2pay e-Transactions)), #5 (The Payment page), #6 (Once successfully processed, the Payment transaction details appear in the order details)
The official readme.txt might help

e-transactions-wc/wc-etransactions.php 85% from 13 tests

The principal PHP file in "Up2pay e-Transactions WooCommerce Payment Gateway" v. 1.0.9 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("e-transactions-wc.php" instead of "wc-etransactions.php")

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
Everything looks great! No dangerous files found in this plugin4,129 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP114828583,458
PO File1147223333
SVG1200121
CSS2253115
JavaScript293102

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity38.90
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods150
▷ Static methods42.67%
▷ Public methods10670.67%
▷ Protected methods3422.67%
▷ Private methods106.67%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants433.33%
▷ Class constants866.67%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
22 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
cards/MAESTRO.png2.13KB1.69KB▼ 20.53%
cards/ILLICADO.png1.34KB1.40KB0.00%
cards/PSC.png0.70KB1.28KB0.00%
cards/MASTERPASS.png2.60KB1.84KB▼ 29.22%
cards/UNEURO.png1.05KB1.54KB0.00%