73% woo-jenga-payment-gateway

Code Review | Jenga Payment Gateway for WooCommerce

WordPress plugin Jenga Payment Gateway for WooCommerce scored73%from 54 tests.

About plugin

  • Plugin page: woo-jenga-payment...
  • Plugin version: 3.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 2, 2019
  • Latest release: Jan 10, 2023
  • Number of updates: 22
  • Update frequency: every 64.3 days
  • Top authors: jengapgw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,439 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by Jenga Payment Gateway for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.19 ▲2.76
Dashboard /wp-admin3.31 ▼0.0348.22 ▼19.96
Posts /wp-admin/edit.php3.36 ▲0.0144.19 ▼10.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.09 ▼16.30
Media Library /wp-admin/upload.php3.24 ▲0.0139.68 ▼3.35

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: 1 new table, 7 new options
New tables
wp_jpgw_trx
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
trx_db_version
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Jenga Payment Gateway for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.30 ▲0.034.80 ▼1.1640.53 ▼5.01
Dashboard /wp-admin2,221 ▲155.92 ▲0.8698.82 ▼7.0337.74 ▼7.37
Posts /wp-admin/edit.php2,099 ▼12.06 ▲0.0838.07 ▼4.8340.87 ▲3.34
Add New Post /wp-admin/post-new.php1,545 ▲1923.48 ▲5.85619.30 ▼77.4065.90 ▲7.58
Media Library /wp-admin/upload.php1,403 ▲94.30 ▲0.04100.39 ▼11.3445.52 ▼1.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_jpgw_trx
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • trx_db_version
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-jenga-payment-gateway/includes/menu.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/woo-jenga-payment-gateway/jenga-payment-gateway-woocommerce.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/woo-jenga-payment-gateway/includes/jpgwpayments.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (settings), #2 (place-order.png), #3 (payment-instructions.png), #4 (checkout.png), #5 (payment-details.png)
  • Requires at least: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

woo-jenga-payment-gateway/jenga-payment-gateway.php 85% from 13 tests

The main PHP script in "Jenga Payment Gateway for WooCommerce" version 3.0.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-jenga-payment-gateway.php" instead of "jenga-payment-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected640 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4293120640

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity12.00
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.22
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods28
▷ Static methods414.29%
▷ Public methods2796.43%
▷ Protected methods13.57%
▷ Private methods00.00%
Functions11
▷ Named functions981.82%
▷ Anonymous functions218.18%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
(invalid) jpwpesa.png19.28KB0.00KB▼ 100.00%