83% woo-gkash

Code Review | Gkash Payment

WordPress plugin Gkash Payment scored83%from 54 tests.

About plugin

  • Plugin page: woo-gkash
  • Plugin version: 1.2.14
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 29, 2019
  • Latest release: Oct 13, 2023
  • Number of updates: 65
  • Update frequency: every 25.5 days
  • Top authors: gkashdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,558 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Gkash Payment
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.65 ▼4.74
Dashboard /wp-admin3.31 ▲0.0047.56 ▼1.06
Posts /wp-admin/edit.php3.36 ▲0.0043.02 ▼6.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.62 ▼10.06
Media Library /wp-admin/upload.php3.23 ▲0.0035.63 ▲0.44

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Gkash Payment
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.74 ▲0.181.71 ▼0.4547.23 ▼2.20
Dashboard /wp-admin2,198 ▲185.49 ▼0.1689.77 ▼9.9840.60 ▼4.93
Posts /wp-admin/edit.php2,106 ▲61.95 ▼0.0234.51 ▼0.8340.97 ▲4.59
Add New Post /wp-admin/post-new.php1,537 ▲923.29 ▲0.17638.26 ▼36.2671.72 ▲14.49
Media Library /wp-admin/upload.php1,406 ▲64.26 ▲0.0396.62 ▼14.5942.82 ▼2.77

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-gkash/wc-gkash.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
The official readme.txt might help

woo-gkash/wc-gkash.php 77% from 13 tests

Analyzing the main PHP file in "Gkash Payment" version 1.2.14
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("woo-gkash.php" instead of "wc-gkash.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 plugin270 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14858270

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1071.43%
▷ Protected methods428.57%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wordpress.png76.29KB30.31KB▼ 60.27%
images/checkout.png55.00KB21.86KB▼ 60.25%