10% bsecure

Code Review | bSecure - Your Universal Checkout

WordPress plugin bSecure - Your Universal Checkout scored10%from 54 tests.

About plugin

  • Plugin page: bsecure
  • Plugin version: 1.7.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Aug 24, 2020
  • Latest release: Oct 3, 2023
  • Number of updates: 118
  • Update frequency: every 9.6 days
  • Top authors: bsecuretech (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /10,924 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User error in wp-content/plugins/bsecure/bsecure.php+139
    bSecure plugin required Woocommerce plugin to be installed and activate.

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

This is a short check of server-side resources used by bSecure - Your Universal Checkout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.02 ▲7.60
Dashboard /wp-admin3.31 ▼0.0343.61 ▼13.69
Posts /wp-admin/edit.php3.36 ▲0.0144.85 ▲2.71
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.59 ▼14.34
Media Library /wp-admin/upload.php3.23 ▲0.0135.43 ▲1.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for bSecure - Your Universal Checkout
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.221.59 ▼0.2742.18 ▲3.12
Dashboard /wp-admin2,206 ▲155.90 ▼0.01105.63 ▲2.9436.00 ▼4.52
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0038.08 ▲5.1433.81 ▲2.23
Add New Post /wp-admin/post-new.php1,514 ▼1417.57 ▼0.90631.82 ▼9.9749.11 ▼3.75
Media Library /wp-admin/upload.php1,388 ▲34.20 ▲0.0195.28 ▼2.2941.29 ▼2.41

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
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Bsecure' not found in wp-content/plugins/bsecure/includes/class-bsecure-admin.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Bsecure' not found in wp-content/plugins/bsecure/includes/class-bsecure-apis.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/bsecure/includes/templates/error-messages.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bsecure/bsecure.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Bsecure' not found in wp-content/plugins/bsecure/includes/class-bsecure-checkout.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/bsecure/includes/class-wc-gateway-bsecure.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Bsecure' not found in wp-content/plugins/bsecure/includes/class-sign-in-with-bsecure.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WC() in wp-content/plugins/bsecure/includes/templates/qisstpay-popup.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bsecure/includes/templates/checkout-reminder-popup.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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:
  • Requires php: The plugin version is formatted incorrectly
The official readme.txt might help

bsecure/bsecure.php Passed 13 tests

The main PHP script in "bSecure - Your Universal Checkout" version 1.7.7 is automatically included on every request by WordPress
44 characters long description:
The best way to checkout for your customers.

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 detected7,369 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP112,5737694,022
CSS5364641,673
HTML22420998
JavaScript227757517
SVG610159

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity106.33
▷ Minimum class complexity16.00
▷ Maximum class complexity357.00
Average method complexity5.51
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods149
▷ Static methods42.68%
▷ Public methods13892.62%
▷ Protected methods74.70%
▷ Private methods42.68%
Functions15
▷ Named functions640.00%
▷ Anonymous functions960.00%
Constants31
▷ Global constants00.00%
▷ Class constants31100.00%
▷ Public constants31100.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
15 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/add-icon.png0.29KB0.22KB▼ 25.08%
assets/images/bsecure-payment-gateway-icon.png33.00KB12.10KB▼ 63.32%
assets/images/edit-icon.png0.25KB0.23KB▼ 6.32%
assets/images/down-arrow.png1.00KB0.15KB▼ 84.96%
assets/images/popup-close.png0.34KB0.25KB▼ 27.76%