74% epx-ecommerce

Code Review | WooCommerce EPX Payment Gateway

WordPress plugin WooCommerce EPX Payment Gateway scored74%from 54 tests.

About plugin

  • Plugin page: epx-ecommerce
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Jun 17, 2020
  • Latest release: Dec 6, 2022
  • Number of updates: 29
  • Update frequency: every 31.1 days
  • Top authors: ahamoudi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,895 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.31ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce EPX Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0639.66 ▲2.00
Dashboard /wp-admin3.37 ▲0.0744.07 ▼1.97
Posts /wp-admin/edit.php3.42 ▲0.0647.54 ▲2.62
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.71 ▼11.89
Media Library /wp-admin/upload.php3.29 ▲0.0634.65 ▲3.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce EPX Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.231.81 ▼0.0948.61 ▲9.12
Dashboard /wp-admin2,209 ▲184.86 ▼0.0095.60 ▼11.1041.60 ▼0.30
Posts /wp-admin/edit.php2,092 ▲32.06 ▲0.0439.59 ▲2.8735.83 ▲4.58
Add New Post /wp-admin/post-new.php1,535 ▲1123.33 ▲0.35643.87 ▲10.3253.44 ▼1.73
Media Library /wp-admin/upload.php1,391 ▲34.13 ▼0.1294.63 ▼0.8040.41 ▼0.62

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_epx_transaction
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • epx_db_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/epx-ecommerce/woocommerce-gateway-epx.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 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
5 plugin tags: woocommerce, credit cards, payanywhere, payments, epx

epx-ecommerce/woocommerce-gateway-epx.php 92% from 13 tests

The entry point to "WooCommerce EPX Payment Gateway" version 1.1.2 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("epx-ecommerce.php" instead of "woocommerce-gateway-epx.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected447 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP310576447

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity7.67
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes133.33%
▷ Concrete classes266.67%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
There were not PNG files found in your plugin