84% bambora-online-checkout

Code Review | Bambora Online Checkout

WordPress plugin Bambora Online Checkout scored84%from 54 tests.

About plugin

  • Plugin page: bambora-online-ch...
  • Plugin version: 6.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 31, 2017
  • Latest release: Oct 24, 2023
  • Number of updates: 142
  • Update frequency: every 17.3 days
  • Top authors: bambora (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /37,332 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
Installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▲0.13ms] Passed 4 tests

A check of server-side resources used by Bambora Online Checkout
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.4038.48 ▲2.46
Dashboard /wp-admin3.71 ▲0.4049.48 ▲4.06
Posts /wp-admin/edit.php3.82 ▲0.4645.39 ▲2.44
Add New Post /wp-admin/post-new.php6.29 ▲0.4084.27 ▼7.64
Media Library /wp-admin/upload.php3.63 ▲0.4034.35 ▲3.26

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Bambora Online Checkout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.121.66 ▼0.2738.98 ▼2.04
Dashboard /wp-admin2,195 ▲215.55 ▼0.0284.97 ▲0.3937.15 ▼0.23
Posts /wp-admin/edit.php2,103 ▲32.15 ▲0.1334.56 ▼2.1935.50 ▼0.00
Add New Post /wp-admin/post-new.php1,526 ▼023.32 ▲0.44649.11 ▼60.7959.24 ▲3.27
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0393.82 ▼7.6442.92 ▼2.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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • 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 everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include(): Failed opening 'BOC_LIBbambora-online-checkout-endpoints.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/bambora-online-checkout/lib/bambora-online-checkout-api.php on line 18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bambora-online-checkout/bambora-online-checkout.php:15
    • > PHP Warning
      Use of undefined constant BOC_LIB - assumed 'BOC_LIB' (this will throw an Error in a future version of PHP) in wp-content/plugins/bambora-online-checkout/lib/bambora-online-checkout-api.php on line 17
    • > PHP Warning
      include(BOC_LIBbambora-online-checkout-models.php): failed to open stream: No such file or directory in wp-content/plugins/bambora-online-checkout/lib/bambora-online-checkout-api.php on line 17
    • > PHP Warning
      Use of undefined constant BOC_LIB - assumed 'BOC_LIB' (this will throw an Error in a future version of PHP) in wp-content/plugins/bambora-online-checkout/lib/bambora-online-checkout-api.php on line 18
    • > PHP Warning
      include(): Failed opening 'BOC_LIBbambora-online-checkout-models.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/bambora-online-checkout/lib/bambora-online-checkout-api.php on line 17
    • > PHP Warning
      include(BOC_LIBbambora-online-checkout-endpoints.php): failed to open stream: No such file or directory in wp-content/plugins/bambora-online-checkout/lib/bambora-online-checkout-api.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

bambora-online-checkout/bambora-online-checkout.php Passed 13 tests

Analyzing the main PHP file in "Bambora Online Checkout" version 6.0.1
55 characters long description:
Bambora Online Checkout payment gateway for WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin4,055 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP75169042,548
PO File43935171,049
CSS2370276
JavaScript12112127
SVG10045
XML10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity21.79
▷ Minimum class complexity1.00
▷ Maximum class complexity256.00
Average method complexity4.32
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods119
▷ Static methods3932.77%
▷ Public methods9478.99%
▷ Protected methods2218.49%
▷ Private methods32.52%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants23
▷ Global constants1043.48%
▷ Class constants1356.52%
▷ Public constants13100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin