93% woo-payxpert-gateway

Code Review | PayXpert for Woocommerce

WordPress plugin PayXpert for Woocommerce scored 93% from 54 tests.

About plugin

  • Plugin page: woo-payxpert-gateway
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Mar 9, 2018
  • Latest release: Mar 29, 2018
  • Number of updates: 5
  • Update frequency: every 4.6 days
  • Top authors: payxpert (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 389 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼142.28ms] Passed 4 tests

A check of server-side resources used by PayXpert for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1238.13 ▲15.85
Dashboard /wp-admin3.06 ▲0.0152.88 ▲7.57
Posts /wp-admin/edit.php3.11 ▼0.0047.56 ▼9.98
Add New Post /wp-admin/post-new.php5.42 ▼0.0192.38 ▼567.92
Media Library /wp-admin/upload.php3.01 ▲0.0031.32 ▲1.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for PayXpert for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲6615.93 ▲0.2312.56 ▲3.3645.49 ▼1.66
Dashboard /wp-admin2,970 ▲365.83 ▼0.32148.20 ▼15.85108.62 ▼3.00
Posts /wp-admin/edit.php2,739 ▼02.84 ▲0.1273.16 ▼24.1894.35 ▲2.30
Add New Post /wp-admin/post-new.php1,615 ▼6821.19 ▲2.47350.19 ▼61.85111.71 ▲3.94
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01161.92 ▼4.97118.57 ▼5.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 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/woo-payxpert-gateway/gateway-payxpert.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tested up to: Invalid plugin version format
  • Requires at least: Invalid plugin version format
You can look at the official readme.txt

woo-payxpert-gateway/gateway-payxpert.php 92% from 13 tests

The main PHP file in "PayXpert for Woocommerce" ver. 1.1.2 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-payxpert-gateway.php" instead of "gateway-payxpert.php")

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
Good job! No executable or dangerous file extensions detected2,093 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity23.30
▷ Minimum class complexity1.00
▷ Maximum class complexity95.00
Average method complexity1.76
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
▷ Static methods3813.01%
▷ Public methods27794.86%
▷ Protected methods10.34%
▷ Private methods144.79%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants43100.00%
▷ Public constants43100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected