10% sibs-woocommerce

Code Review | SIBS woocommerce payment gateway

WordPress plugin SIBS woocommerce payment gateway scored10%from 54 tests.

About plugin

  • Plugin page: sibs-woocommerce
  • Plugin version: 2.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Oct 26, 2020
  • Number of updates: 27
  • Update frequency: every 23.2 days
  • Top authors: comprassibs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,065 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.18MB] [CPU: ▼1.96ms] Passed 4 tests

Analyzing server-side resources used by SIBS woocommerce payment gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1853.53 ▲11.74
Dashboard /wp-admin3.47 ▲0.1744.73 ▼7.58
Posts /wp-admin/edit.php3.59 ▲0.2347.77 ▼0.67
Add New Post /wp-admin/post-new.php6.08 ▲0.2081.94 ▲0.22
Media Library /wp-admin/upload.php3.40 ▲0.1736.60 ▲0.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 207 new files
Database: 2 new tables, 10 new options
New tables
wp_sibs_payment_information
wp_sibs_transaction
New WordPress options
my_plugin_page_name
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
my_plugin_page_id
db_upgraded
theysaidso_admin_options
sibs_version
my_plugin_page_title
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by SIBS woocommerce payment gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.34 ▼1.022.37 ▲0.6959.95 ▲20.18
Dashboard /wp-admin2,219 ▲285.83 ▲0.95103.46 ▼11.3537.77 ▼5.93
Posts /wp-admin/edit.php2,104 ▲122.00 ▼0.0240.73 ▼0.6636.96 ▲1.31
Add New Post /wp-admin/post-new.php1,533 ▼917.43 ▼0.96678.13 ▲18.6557.05 ▼14.05
Media Library /wp-admin/upload.php1,407 ▲194.22 ▲0.0298.08 ▼2.2041.77 ▼3.15

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_sibs_payment_information
    • wp_sibs_transaction
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

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 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
Please fix the following
  • 64× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_ChaCha20' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/namespaced/Core/ChaCha20.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Util' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/src/Core/Curve25519/H.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Compat' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/lib/constants.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/namespaced/Core/Curve25519.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Curve25519_Ge_P2' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/namespaced/Core/Curve25519/Ge/P2.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_SipHash' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/namespaced/Core/SipHash.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_ChaCha20_Ctx' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/src/Core/ChaCha20/IetfCtx.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_Util' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/src/Core/Poly1305.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core_ChaCha20' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/src/Core/HChaCha20.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ParagonIE_Sodium_Core32_HSalsa20' not found in wp-content/plugins/sibs-woocommerce/external/sodium_compat-1.7.0/src/Core32/XSalsa20.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Requires php: Invalid version format
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

sibs-woocommerce/class-sibs-payment-gateway.php 92% from 13 tests

"SIBS woocommerce payment gateway" version 2.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sibs-woocommerce.php" instead of "class-sibs-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin28,260 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1373,49710,01323,898
PO File71,5271,9253,661
CSS24910258
Markdown3660223
JSON20095
JavaScript3121342
XML10028
make19426
YAML12024
Bourne Shell1215

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity16.54
▷ Minimum class complexity1.00
▷ Maximum class complexity304.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes106
▷ Abstract classes2018.87%
▷ Concrete classes8681.13%
▷ Final classes00.00%
Methods704
▷ Static methods51773.44%
▷ Public methods60385.65%
▷ Protected methods456.39%
▷ Private methods567.95%
Functions156
▷ Named functions15498.72%
▷ Anonymous functions21.28%
Constants198
▷ Global constants42.02%
▷ Class constants19497.98%
▷ Public constants194100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
35 PNG files occupy 0.61MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/dankort.png8.13KB3.13KB▼ 61.45%
assets/images/postepay.png25.98KB8.36KB▼ 67.83%
assets/images/visaelectron.png13.17KB4.30KB▼ 67.31%
assets/images/swisspostfinance.png24.16KB6.76KB▼ 72.04%
assets/images/paypal.png43.04KB6.82KB▼ 84.14%