84% axima-payment-gateway

Code Review | Pays – WooCommerce Payment Gateway

WordPress plugin Pays – WooCommerce Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: axima-payment-gat...
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.1
  • WordPress version: 6.3.1
  • First release: Apr 21, 2017
  • Latest release: Dec 13, 2022
  • Number of updates: 55
  • Update frequency: every 37.5 days
  • Top authors: marekgach (76.36%)greenyaptec (25.45%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /4,093 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
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Pays – WooCommerce Payment Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0047.57 ▲10.14
Dashboard /wp-admin3.31 ▲0.0046.56 ▼4.81
Posts /wp-admin/edit.php3.36 ▲0.0043.50 ▼8.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.92 ▼15.92
Media Library /wp-admin/upload.php3.23 ▲0.0032.56 ▼2.05

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Pays – WooCommerce Payment Gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.65 ▲0.022.09 ▲0.3343.20 ▼0.73
Dashboard /wp-admin2,206 ▲185.86 ▲0.95113.25 ▲2.7142.58 ▼4.72
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0635.93 ▼5.4633.61 ▼3.79
Add New Post /wp-admin/post-new.php1,529 ▲1018.03 ▼5.15618.07 ▼57.4858.06 ▲7.27
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0794.18 ▼5.2540.23 ▼4.16

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

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
Good news, no errors were detected

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
The following issues need your attention
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php:3
    • > PHP Notice
      Undefined variable: domain in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php on line 3
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php on line 2
    • > PHP Notice
      Undefined variable: domain in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php on line 3
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php:3
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php on line 2
    • > PHP Notice
      Undefined variable: page in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/axima-payment-gateway/src/templates/includes/menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

axima-payment-gateway/axima-payment-gateway.php Passed 13 tests

"Pays – WooCommerce Payment Gateway" version 2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
140 characters long description:
Payment gate, supporting EUR, USD and CZK. Contains all common payment methods, including mobile and SMS payments. Support for EET included.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin941 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP918577840
PO File1424597
CSS2082
JavaScript1052

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity22.00
▷ Minimum class complexity11.00
▷ Maximum class complexity38.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods43
▷ Static methods49.30%
▷ Public methods2865.12%
▷ Protected methods00.00%
▷ Private methods1534.88%
Functions15
▷ Named functions16.67%
▷ Anonymous functions1493.33%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png34.39KB15.48KB▼ 54.99%
assets/screenshot-1.png21.26KB9.51KB▼ 55.27%
assets/screenshot-3.png75.21KB31.27KB▼ 58.42%