79% wc-cbk

Code Review | Gateway for CBK Al-Tijari KNET

WordPress plugin Gateway for CBK Al-Tijari KNET scored79%from 54 tests.

About plugin

  • Plugin page: wc-cbk
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 20, 2021
  • Latest release: Oct 15, 2023
  • Number of updates: 27
  • Update frequency: every 25.7 days
  • Top authors: alnazer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,050 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

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

Server-side resources used by Gateway for CBK Al-Tijari KNET
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.49 ▼3.52
Dashboard /wp-admin3.33 ▼0.0252.17 ▼14.64
Posts /wp-admin/edit.php3.44 ▲0.0951.18 ▲2.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.49 ▼15.23
Media Library /wp-admin/upload.php3.25 ▲0.0240.53 ▲0.58

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 17 new files
Database: 1 new table, 7 new options
New tables
wp_cbk_knet_transactions
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
cbk_knet_db_version
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Gateway for CBK Al-Tijari KNET
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.63 ▲1.411.62 ▼2.7841.80 ▼2.58
Dashboard /wp-admin2,205 ▲255.55 ▲0.0388.14 ▼5.9941.62 ▲0.00
Posts /wp-admin/edit.php2,113 ▲132.04 ▲0.0139.55 ▲2.5037.88 ▲0.91
Add New Post /wp-admin/post-new.php1,534 ▲623.65 ▲0.52693.80 ▲9.8954.25 ▲2.07
Media Library /wp-admin/upload.php1,410 ▲134.28 ▲0.0498.71 ▼19.4348.29 ▲1.80

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_cbk_knet_transactions
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • cbk_knet_db_version
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #10, #12, #13, #14, #15, #16, #17, #2, #3, #4, #5, #6, #7, #8, #9 in wc-cbk/assets to your readme.txt
You can look at the official readme.txt

wc-cbk/index.php 92% from 13 tests

The principal PHP file in "Gateway for CBK Al-Tijari KNET" v. 1.6.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wc-cbk.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,223 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP42202341,923
HTML5120185
Markdown139077
SVG10138

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity57.75
▷ Minimum class complexity2.00
▷ Maximum class complexity110.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity54.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods60
▷ Static methods58.33%
▷ Public methods4981.67%
▷ Protected methods35.00%
▷ Private methods813.33%
Functions17
▷ Named functions1482.35%
▷ Anonymous functions317.65%
Constants25
▷ Global constants14.00%
▷ Class constants2496.00%
▷ Public constants24100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/knet-logo-50.png2.45KB1.74KB▼ 29.01%
assets/tpay-logo-100.png4.61KB2.41KB▼ 47.64%
assets/knet-logo.png10.11KB4.81KB▼ 52.46%
assets/cbk-logo.png11.17KB8.99KB▼ 19.58%