10% wc-buckaroo-bpe-gateway

Code Review | Buckaroo Woocommerce Payments Plugin

WordPress plugin Buckaroo Woocommerce Payments Plugin scored 10% from 54 tests.

About plugin

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active / 31,972 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/wc-buckaroo-bpe-gateway/install/migration/list/migration-2.24.1.php+72
    Invalid argument supplied for foreach()

Server metrics [RAM: ▲0.12MB] [CPU: ▲3.05ms] Passed 4 tests

A check of server-side resources used by Buckaroo Woocommerce Payments Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1240.30 ▲1.65
Dashboard /wp-admin3.42 ▲0.1152.62 ▲5.04
Posts /wp-admin/edit.php3.53 ▲0.1757.64 ▲11.59
Add New Post /wp-admin/post-new.php6.02 ▲0.1396.13 ▼1.21
Media Library /wp-admin/upload.php3.34 ▲0.1140.57 ▲6.70

Server storage [IO: ▲8.04MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • There were 6 files (111.06KB) illegally modified outside of "wp-content/plugins/wc-buckaroo-bpe-gateway/" and "wp-content/uploads/"
    • (new file) wp-content/languages/plugins/wc-buckaroo-bpe-gateway-nl_NL.po
    • (new file) wp-content/languages/plugins/wc-buckaroo-bpe-gateway-de_DE.po
    • (new file) wp-content/languages/plugins/wc-buckaroo-bpe-gateway-fr_FR.mo
    • (new file) wp-content/languages/plugins/wc-buckaroo-bpe-gateway-fr_FR.po
    • (new file) wp-content/languages/plugins/wc-buckaroo-bpe-gateway-nl_NL.mo
    • (new file) wp-content/languages/plugins/wc-buckaroo-bpe-gateway-de_DE.mo
Filesystem: 309 new files
Database: 2 new tables, 9 new options
New tables
wp_woocommerce_buckaroo_transactions
wp_buckaroo_log
New WordPress options
db_upgraded
BUCKAROO_BPE_VERSION
woocommerce_buckaroo_exodus
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
woocommerce_meta_box_errors

Browser metrics Passed 4 tests

Buckaroo Woocommerce Payments Plugin: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.22 ▼1.174.95 ▲2.8843.64 ▼4.92
Dashboard /wp-admin2,213 ▲285.87 ▲0.08104.68 ▲8.0039.47 ▼4.01
Posts /wp-admin/edit.php2,098 ▲92.11 ▲0.1241.68 ▲1.0236.19 ▲1.57
Add New Post /wp-admin/post-new.php1,534 ▲1318.21 ▼5.01576.90 ▼35.6450.72 ▼13.82
Media Library /wp-admin/upload.php1,401 ▲104.28 ▲0.0896.79 ▲0.4741.91 ▼1.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_buckaroo_log
    • wp_woocommerce_buckaroo_transactions
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • BUCKAROO_BPE_VERSION
    • woocommerce_meta_box_errors
    • widget_recent-comments
    • can_compress_scripts
    • woocommerce_buckaroo_exodus
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wc-buckaroo-bpe-gateway/templates/payconiq/qrcode.php
    • > /wp-content/plugins/wc-buckaroo-bpe-gateway/tests/bootstrap.php
  • 93× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'BuckarooPaymentMethod' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/api/paymentmethods/billink/billink.php:3
    • > PHP Notice
      Undefined variable: order_capture in wp-content/plugins/wc-buckaroo-bpe-gateway/library/klarnakp/capture-form.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wc-buckaroo-bpe-gateway/templates/idin/cart.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/class-wc-session-handler-buckaroo.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/class-wc-session-handler-buckaroo.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/class-wc-session-handler-buckaroo.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/class-wc-session-handler-buckaroo.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'BuckarooConfig' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/api/idin.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/class-wc-session-handler-buckaroo.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Session_Handler' not found in wp-content/plugins/wc-buckaroo-bpe-gateway/library/class-wc-session-handler-buckaroo.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed: The official readme.txt might help

wc-buckaroo-bpe-gateway/index.php 92% from 13 tests

The primary PHP file in "Buckaroo Woocommerce Payments Plugin" version 3.9.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-buckaroo-bpe-gateway.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
It is important to fix the following items
  • Do not distribute dangerous files with your plugin
    • .lnk - File Shortcut in Windows
      • wp-content/plugins/wc-buckaroo-bpe-gateway/library/api/wsdl/wsdl - Shortcut.lnk
37,584 lines of code in 264 files:
LanguageFilesBlank linesComment linesLines of code
PHP1562,9884,81516,764
SVG4914479,303
JSON3006,213
PO File37358201,848
JavaScript191941561,484
XSD25001,399
CSS12824244
XML42228125
Bourne Shell12111123
Markdown221067
YAML10014

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity13.25
▷ Minimum class complexity1.00
▷ Maximum class complexity385.00
Average method complexity3.11
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes136
▷ Abstract classes42.94%
▷ Concrete classes13297.06%
▷ Final classes21.52%
Methods799
▷ Static methods14117.65%
▷ Public methods56370.46%
▷ Protected methods15118.90%
▷ Private methods8510.64%
Functions99
▷ Named functions6060.61%
▷ Anonymous functions3939.39%
Constants98
▷ Global constants44.08%
▷ Class constants9495.92%
▷ Public constants9398.94%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
21 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
library/buckaroo_images/24x24/empayment.png3.74KB1.23KB▼ 67.08%
library/buckaroo_images/24x24/billink.png2.82KB2.34KB▼ 17.02%
library/buckaroo_images/24x24/emaestro.png3.72KB1.18KB▼ 68.27%
library/buckaroo_images/24x24/sofort.png0.55KB0.49KB▼ 10.00%
library/buckaroo_images/24x24/p24.png2.85KB1.87KB▼ 34.42%