83% woo-payment-gateways-bank-indo-kode-payment

Code Review | WooWIB - Payment Gateways Bank Indonesia

WordPress plugin WooWIB - Payment Gateways Bank Indonesia scored83%from 54 tests.

About plugin

  • Plugin page: woo-payment-gatew...
  • Plugin version: 2.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Oct 13, 2018
  • Latest release: Feb 20, 2023
  • Number of updates: 57
  • Update frequency: every 27.9 days
  • Top authors: initialdhi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /11,781 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼8.65ms] Passed 4 tests

An overview of server-side resources used by WooWIB - Payment Gateways Bank Indonesia
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.11 ▼0.94
Dashboard /wp-admin3.31 ▼0.0449.30 ▼27.10
Posts /wp-admin/edit.php3.36 ▲0.0043.72 ▼1.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.82 ▼4.93
Media Library /wp-admin/upload.php3.23 ▲0.0034.83 ▲0.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for WooWIB - Payment Gateways Bank Indonesia
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.37 ▲0.111.92 ▼0.0347.29 ▲1.71
Dashboard /wp-admin2,204 ▲275.62 ▲0.0894.11 ▼8.0143.41 ▲0.19
Posts /wp-admin/edit.php2,115 ▲151.98 ▲0.0034.85 ▼2.0535.41 ▼0.13
Add New Post /wp-admin/post-new.php1,439 ▼8922.24 ▼0.76548.59 ▼100.5650.39 ▲1.97
Media Library /wp-admin/upload.php1,415 ▲154.24 ▲0.0698.63 ▲0.6540.21 ▼1.45

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woo-payment-gateways-bank-indo-kode-payment/templates/admin/tab-setting/html-tab-setting.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/woo-payment-gateways-bank-indo-kode-payment/templates/admin/html-setting.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

woo-payment-gateways-bank-indo-kode-payment/woowib.php 77% from 13 tests

Analyzing the main PHP file in "WooWIB - Payment Gateways Bank Indonesia" version 2.3.3
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("woo-payment-gateways-bank-indo-kode-payment.php" instead of "woowib.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 309 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected443 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP13157441424
CSS11015
SVG4004

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity4.22
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods33
▷ Static methods13.03%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin