83% paybox-woocommerce-payment-gateway

Code Review | Woocommerce PayBox Payment Gateway

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

About plugin

  • Plugin page: paybox-woocommerc...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.3.1
  • WordPress version: 6.3.1
  • First release: Sep 30, 2015
  • Latest release: Jan 7, 2016
  • Number of updates: 19
  • Update frequency: every 6.4 days
  • Top authors: flistefliste (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,498 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by Woocommerce PayBox Payment Gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0043.91 ▲2.86
Dashboard /wp-admin3.31 ▲0.0047.31 ▲2.92
Posts /wp-admin/edit.php3.36 ▲0.0049.76 ▼1.11
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.23 ▼12.65
Media Library /wp-admin/upload.php3.23 ▲0.0034.37 ▲0.15

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Woocommerce PayBox Payment Gateway
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.54 ▼0.841.67 ▲0.0236.42 ▼9.80
Dashboard /wp-admin2,209 ▲185.86 ▲0.98102.08 ▲0.3338.18 ▼7.37
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0041.05 ▼1.7537.23 ▼0.71
Add New Post /wp-admin/post-new.php1,514 ▼021.52 ▼1.87701.76 ▲90.1057.80 ▼11.13
Media Library /wp-admin/upload.php1,388 ▼04.26 ▲0.1097.92 ▼9.2940.91 ▼5.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× 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-payment-gateway/woocommerce_paybox_gateway.class.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: payment gateway, ecommerce, woocommerce, e-commerce, payment...

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

The principal PHP file in "Woocommerce PayBox Payment Gateway" v. 1.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 142 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("paybox-woocommerce-payment-gateway.php" instead of "woocommerce_paybox_gateway.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 detected905 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP35095449
PO File2176344446
Markdown12010

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.35
Average class complexity29.00
▷ Minimum class complexity3.00
▷ Maximum class complexity55.00
Average method complexity6.60
▷ 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 methods330.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/paybox.png11.32KB4.75KB▼ 58.07%