89% chapa-payment-gateway-for-woocommerce

Code Review | Chapa Payment Gateway Plugin for WooCommerce

WordPress plugin Chapa Payment Gateway Plugin for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: chapa-payment-gat...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.2.1
  • WordPress version: 6.3.1
  • First release: May 3, 2022
  • Latest release: May 19, 2023
  • Number of updates: 12
  • Update frequency: every 35.6 days
  • Top authors: chapaet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Chapa Payment Gateway Plugin for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.66 ▼3.71
Dashboard /wp-admin3.32 ▲0.0153.51 ▲0.40
Posts /wp-admin/edit.php3.37 ▲0.0150.52 ▲0.96
Add New Post /wp-admin/post-new.php5.90 ▲0.01101.73 ▲6.82
Media Library /wp-admin/upload.php3.24 ▲0.0141.44 ▲3.72

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Chapa Payment Gateway Plugin for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.28 ▼1.371.74 ▼0.1147.79 ▼0.09
Dashboard /wp-admin2,209 ▲184.85 ▼1.05104.04 ▼17.4742.27 ▼1.58
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.0438.93 ▼0.4736.48 ▼0.07
Add New Post /wp-admin/post-new.php1,514 ▼017.53 ▼6.07661.75 ▼22.5968.44 ▲11.31
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0598.59 ▲0.0141.86 ▲0.29

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: ethiopia, chapa, woocommerce, etb, telebirr...

chapa-payment-gateway-for-woocommerce/woo-chapa.php 85% from 13 tests

"Chapa Payment Gateway Plugin for WooCommerce" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.5" instead of "3.0.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("chapa-payment-gateway-for-woocommerce.php" instead of "woo-chapa.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
Good job! No executable or dangerous file extensions detected364 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP253118364

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png1.30KB0.69KB▼ 47.15%