58% gk-sslcommerz

Code Review | SSLCommerz Payment Gateway

WordPress plugin SSLCommerz Payment Gateway scored58%from 54 tests.

About plugin

  • Plugin page: gk-sslcommerz
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.2-4.4
  • WordPress version: 6.3.1
  • First release: Sep 7, 2015
  • Latest release: Dec 29, 2015
  • Number of updates: 7
  • Update frequency: every 16.2 days
  • Top authors: goodkoding (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /4,360 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.29MB] [CPU: ▼2.05ms] Passed 4 tests

Server-side resources used by SSLCommerz Payment Gateway
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2846.46 ▲5.47
Dashboard /wp-admin3.60 ▲0.2948.52 ▲2.88
Posts /wp-admin/edit.php3.71 ▲0.3546.19 ▼0.70
Add New Post /wp-admin/post-new.php6.20 ▲0.3183.69 ▼9.02
Media Library /wp-admin/upload.php3.52 ▲0.2933.79 ▼1.37
Payment Settings /wp-admin/admin.php?page=gk-sslcommerz-options3.5034.40
Payment Statistics /wp-admin/admin.php?page=gk-sslcommerz-payment-statistics3.5333.31

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: 1 new table, 8 new options
New tables
wp_gk_sslcommerz_payments
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_gk_sslcommerz_widget
db_upgraded
theysaidso_admin_options
gk_sslcommerz_db_version
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SSLCommerz Payment Gateway
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲7013.61 ▼0.681.76 ▼0.4842.31 ▼3.12
Dashboard /wp-admin2,230 ▲424.90 ▲0.00104.63 ▼6.5840.20 ▼0.50
Posts /wp-admin/edit.php2,119 ▲302.10 ▼0.0837.02 ▲0.7533.83 ▲1.29
Add New Post /wp-admin/post-new.php1,551 ▲1823.38 ▲0.16665.20 ▲2.7359.04 ▲7.68
Media Library /wp-admin/upload.php1,418 ▲274.30 ▲0.08104.60 ▲5.2042.31 ▼0.50
Payment Settings /wp-admin/admin.php?page=gk-sslcommerz-options1,1362.3026.5227.88
Payment Statistics /wp-admin/admin.php?page=gk-sslcommerz-payment-statistics8092.0625.7321.24

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/gk-sslcommerz/uninstall.php+16
    Undefined variable: gk_sslcommerz_payments_table
  • Zombie tables detected upon uninstall: 1 table
    • wp_gk_sslcommerz_payments
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_gk_sslcommerz_widget
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/gk-sslcommerz/uninstall.php
    • > /wp-content/plugins/gk-sslcommerz/gk-sslcommerz.php
    • > /wp-content/plugins/gk-sslcommerz/includes/gk-sslcommerz-settings.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/gk-sslcommerz/class/gk-sslcommerz-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gk-sslcommerz/partials/admin_payment_statistics.php:10
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gk-sslcommerz/partials/admin_widget_form.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gk-sslcommerz/partials/admin_payment_invoice.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gk-sslcommerz/partials/admin_option_page.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/gk-sslcommerz/partials/admin_payment_archive.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
9 plugin tags: visa, taka, payment gateway, bkash, payment...

gk-sslcommerz/gk-sslcommerz.php Passed 13 tests

The entry point to "SSLCommerz Payment Gateway" version 0.4 is a PHP file that has certain tags in its header comment area
62 characters long description:
Integrate the SSLCommerz payment gateway to WordPress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,909 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP152812281,820
CSS3181580
JavaScript1059

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity29.29
▷ Minimum class complexity1.00
▷ Maximum class complexity98.00
Average method complexity4.09
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods64
▷ Static methods69.38%
▷ Public methods5890.62%
▷ Protected methods00.00%
▷ Private methods69.38%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin