84% woocommerce-paybox-gateway

Code Review | Woocommerce PayBox Payment Gateway

WordPress plugin Woocommerce PayBox Payment Gateway scored84%from 54 tests.

About plugin

  • Plugin page: woocommerce-paybo...
  • Plugin version: 0.4.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Sep 12, 2013
  • Latest release: May 17, 2014
  • Number of updates: 21
  • Update frequency: every 11.8 days
  • Top authors: swoelffel (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,555 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
Install script ran successfully

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

A check of server-side resources used by Woocommerce PayBox Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.50 ▼3.63
Dashboard /wp-admin3.31 ▼0.0443.55 ▼14.51
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▼3.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0081.74 ▼31.40
Media Library /wp-admin/upload.php3.23 ▲0.0037.51 ▲6.97

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Woocommerce PayBox Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.131.68 ▼0.0742.85 ▼0.38
Dashboard /wp-admin2,206 ▲174.88 ▼1.02110.29 ▲3.1141.52 ▲3.13
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0839.65 ▼1.5735.77 ▲1.00
Add New Post /wp-admin/post-new.php1,542 ▲923.05 ▼0.21648.91 ▲9.6352.69 ▲2.91
Media Library /wp-admin/upload.php1,382 ▼64.26 ▲0.1097.20 ▲0.3942.01 ▼3.99

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woocommerce-paybox-gateway/woocommerce_paybox_gateway.class.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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
7 plugin tags: ecommerce, payment gateway, e-commerce, paybox, payment...

woocommerce-paybox-gateway/woocommerce_paybox_gateway.php 92% from 13 tests

The main PHP script in "Woocommerce PayBox Payment Gateway" version 0.4.6 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-paybox-gateway.php" instead of "woocommerce_paybox_gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin941 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP33383490
PO File2186374410
CSS15529
JavaScript12312

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity28.50
▷ Minimum class complexity3.00
▷ Maximum class complexity54.00
Average method complexity6.50
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods440.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paybox.png31.46KB10.58KB▼ 66.38%