90% bux-digital-gateway

Code Review | BUX.digital Payment Gateway for WooCommerce

WordPress plugin BUX.digital Payment Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: bux-digital-gateway
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 3, 2022
  • Latest release: Dec 3, 2022
  • Number of updates: 6
  • Update frequency: every 10.0 days
  • Top authors: badgercash (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /244 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by BUX.digital Payment Gateway for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.97 ▼3.28
Dashboard /wp-admin3.31 ▼0.0447.48 ▼15.46
Posts /wp-admin/edit.php3.36 ▲0.0055.17 ▲9.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0091.17 ▼12.22
Media Library /wp-admin/upload.php3.23 ▲0.0036.46 ▼0.87

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by BUX.digital Payment Gateway for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.521.89 ▼0.1343.78 ▲0.59
Dashboard /wp-admin2,209 ▲184.84 ▼0.05104.51 ▼4.0438.20 ▼6.16
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0340.20 ▼1.9334.46 ▼0.49
Add New Post /wp-admin/post-new.php1,533 ▲1323.51 ▲0.57656.31 ▼33.5647.63 ▼4.75
Media Library /wp-admin/upload.php1,385 ▲64.17 ▼0.0899.24 ▼7.0843.54 ▼3.30

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce, bitcoin, bux, cryptocurrency, ecash

bux-digital-gateway/class-wc-gateway-bux.php 92% from 13 tests

The principal PHP file in "BUX.digital Payment Gateway for WooCommerce" v. 1.0.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bux-digital-gateway.php" instead of "class-wc-gateway-bux.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected380 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP180121380

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity31.50
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity5.69
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/bux.png12.61KB2.48KB▼ 80.30%