90% centrobill-payment-gateway

Code Review | CentroBill Payment Gateway for WooCommerce

WordPress plugin CentroBill Payment Gateway for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: centrobill-paymen...
  • Plugin version: 2.2.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.1
  • WordPress version: 6.3.1
  • First release: Jun 15, 2021
  • Latest release: Nov 10, 2022
  • Number of updates: 21
  • Update frequency: every 50.1 days
  • Top authors: centrobill (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.27ms] Passed 4 tests

An overview of server-side resources used by CentroBill Payment Gateway for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0345.37 ▲3.12
Dashboard /wp-admin3.34 ▲0.0350.52 ▼5.62
Posts /wp-admin/edit.php3.39 ▲0.0352.83 ▲2.24
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.30 ▼1.02
Media Library /wp-admin/upload.php3.27 ▲0.0339.23 ▼0.68

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

CentroBill Payment Gateway for WooCommerce: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.77 ▲0.202.13 ▲0.4644.61 ▲1.25
Dashboard /wp-admin2,192 ▲155.59 ▼0.0394.01 ▲0.6942.93 ▲1.67
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0141.31 ▲1.9434.81 ▼1.13
Add New Post /wp-admin/post-new.php1,526 ▼023.11 ▲0.09701.78 ▲5.3172.20 ▲16.42
Media Library /wp-admin/upload.php1,403 ▲34.11 ▼0.08103.55 ▼6.5444.03 ▼0.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: centrobill, payment gateway, online payment, credit card, sepa...

centrobill-payment-gateway/wc-centrobill.php 92% from 13 tests

The entry point to "CentroBill Payment Gateway for WooCommerce" version 2.2.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("centrobill-payment-gateway.php" instead of "wc-centrobill.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,245 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP393776272,223
JavaScript13022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.32
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes210.53%
▷ Concrete classes1789.47%
▷ Final classes00.00%
Methods119
▷ Static methods1915.97%
▷ Public methods8773.11%
▷ Protected methods21.68%
▷ Private methods3025.21%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants68
▷ Global constants45.88%
▷ Class constants6494.12%
▷ Public constants64100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sofortbanking.png4.41KB2.34KB▼ 46.95%
assets/images/przelewy24.png7.38KB2.24KB▼ 69.59%
assets/images/crypto.png3.65KB2.48KB▼ 31.91%
assets/images/centrobill_logo.png2.93KB1.33KB▼ 54.40%
assets/images/ideal.png4.09KB1.56KB▼ 61.85%