83% paybox-woocommerce-gateway

Code Review | Paybox WooCommerce Payment Gateway

WordPress plugin Paybox WooCommerce Payment Gateway scored83%from 54 tests.

About plugin

  • Plugin page: paybox-woocommerc...
  • Plugin version: 0.9.9.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Feb 27, 2023
  • Number of updates: 141
  • Update frequency: every 19.3 days
  • Top authors: paybox (92.91%)BM Services (6.38%)prestamodule (2.13%)

Code review

54 tests

User reviews

4 reviews

Install metrics

700+ active /16,842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Paybox WooCommerce Payment Gateway
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.55 ▼4.82
Dashboard /wp-admin3.31 ▼0.0444.68 ▼14.25
Posts /wp-admin/edit.php3.36 ▲0.0047.77 ▼5.67
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.55 ▼14.60
Media Library /wp-admin/upload.php3.23 ▲0.0033.96 ▼5.39

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Paybox WooCommerce Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.141.78 ▼0.0046.09 ▲5.91
Dashboard /wp-admin2,206 ▲215.91 ▲0.01106.29 ▼0.0741.11 ▼3.18
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0039.70 ▼1.1034.53 ▼0.14
Add New Post /wp-admin/post-new.php1,533 ▲523.34 ▲0.08684.02 ▲32.0454.58 ▼0.88
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0196.03 ▼15.5645.81 ▲0.77

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/paybox-woocommerce-gateway/class/wc-paybox-abstract-gateway.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Paybox_Abstract_Gateway' not found in wp-content/plugins/paybox-woocommerce-gateway/class/wc-paybox-threetime-gateway.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Paybox_Abstract_Gateway' not found in wp-content/plugins/paybox-woocommerce-gateway/class/wc-paybox-standard-gateway.php:9

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Invalid URI ("none")
Please take inspiration from this readme.txt

paybox-woocommerce-gateway/woocommerce-paybox.php 85% from 13 tests

The principal PHP file in "Paybox WooCommerce Payment Gateway" v. 0.9.9.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("paybox-woocommerce-gateway.php" instead of "woocommerce-paybox.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
No dangerous file extensions were detected2,110 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP92052491,906
PO File182100204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.22
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.90
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods73
▷ Static methods22.74%
▷ Public methods6386.30%
▷ Protected methods34.11%
▷ Private methods79.59%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.21MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png4.29KB2.11KB▼ 50.84%
images/3xcbvisamcecb.png6.41KB3.30KB▼ 48.49%
images/logo.png4.92KB3.40KB▼ 30.79%
assets/banner-1544x500.png138.14KB54.53KB▼ 60.53%
assets/banner-772X250.png50.96KB21.24KB▼ 58.32%