90% wc-gateway-cib

Code Review | Payment Gateway via CIB for WooCommerce

WordPress plugin Payment Gateway via CIB for WooCommerce scored 90% from 54 tests.

About plugin

  • Plugin page: wc-gateway-cib
  • Plugin version: 1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Aug 3, 2019
  • Latest release: Feb 14, 2022
  • Number of updates: 16
  • Update frequency: every 58.1 days
  • Top authors: szathmari (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 2,129 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 successfully, without throwing any errors or notices

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

Server-side resources used by Payment Gateway via CIB for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.60 ▼8.45
Dashboard /wp-admin3.31 ▲0.0144.21 ▼5.69
Posts /wp-admin/edit.php3.42 ▲0.0748.15 ▲2.59
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.91 ▼1.83
Media Library /wp-admin/upload.php3.23 ▲0.0032.92 ▲1.50

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway via CIB for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.111.51 ▼0.2038.76 ▼7.64
Dashboard /wp-admin2,206 ▲184.81 ▼0.12106.92 ▼12.0442.45 ▼2.29
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0539.94 ▲6.1434.90 ▲1.56
Add New Post /wp-admin/post-new.php1,535 ▲1623.16 ▲0.32632.73 ▼1.1552.28 ▼3.86
Media Library /wp-admin/upload.php1,388 ▲64.23 ▲0.1491.63 ▼4.9842.77 ▼2.52

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: e-commerce, gateway, woocommerce, payment, cib

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

The primary PHP file in "Payment Gateway via CIB for WooCommerce" version 1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-gateway-cib.php" instead of "class-wc-gateway-cib.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin899 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP521171899

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity15.33
▷ Minimum class complexity5.00
▷ Maximum class complexity32.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods27
▷ Static methods518.52%
▷ Public methods2696.30%
▷ Protected methods13.70%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/cib_20.png3.30KB3.29KB0.41%
assets/cib_25.png4.26KB4.26KB0.00%
assets/cib_40.png7.57KB7.56KB0.06%