88% jazzcash-woocommerce-gateway

Code Review | WooCommerce JazzCash Gateway Plugin

WordPress plugin WooCommerce JazzCash Gateway Plugin scored 88% from 54 tests.

About plugin

  • Plugin page: jazzcash-woocomme...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.9.8
  • WordPress version: 5.9.2
  • First release: Jun 5, 2017
  • Latest release: Dec 6, 2018
  • Number of updates: 10
  • Update frequency: every 55.8 days
  • Top authors: jazzcms12 (60%)khalidmehmoodawan (50%)

Code review

54 tests

User reviews

2 reviews

Install metrics

2,000+ active / 15,859 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

A check of server-side resources used by WooCommerce JazzCash Gateway Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0154.28 ▲4.47
Dashboard /wp-admin3.41 ▲0.0133.17 ▼1.05
Posts /wp-admin/edit.php3.65 ▲0.0138.97 ▲3.24
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.18 ▼1,169.15
Media Library /wp-admin/upload.php3.30 ▼0.0023.01 ▼8.03

Server storage [IO: ▲2.09MB] [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: 56 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce JazzCash Gateway Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲4115.88 ▲0.086.44 ▲0.412.07 ▼0.68
Dashboard /wp-admin2,892 ▲386.11 ▼0.12122.90 ▼12.14156.57 ▼5.45
Posts /wp-admin/edit.php2,688 ▼63.23 ▼0.0162.86 ▲0.93140.08 ▲2.54
Add New Post /wp-admin/post-new.php1,661 ▼4915.76 ▼5.26456.93 ▲22.82154.95 ▼1.11
Media Library /wp-admin/upload.php1,701 ▲35.47 ▼0.07146.43 ▲3.29180.72 ▼7.02

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 50% 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 0% 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
  • 27× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient7.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/getfile2client.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient14.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/client.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient13.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient3b.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient4.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient11.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient8.php
    • > /wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/client2.php
  • 18× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/client.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Call to a member function BrowseNodeSearchRequest() on null in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/samples/wsdlclient2.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/class.soap_fault.php:14
    • > PHP Fatal error
      require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/php') in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/class.wsdl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Payment_Gateway' not found in wp-content/plugins/jazzcash-woocommerce-gateway/woocommerce-jazzcash.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/class.soap_parser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/class.soap_transport_http.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/jazzcash-woocommerce-gateway/wsdl/includes/nusoap-0.9.5/lib/class.soap_server.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: woocommerce, jazzcash

jazzcash-woocommerce-gateway/woocommerce-jazzcash-gateway.php 92% from 13 tests

The principal PHP file in "WooCommerce JazzCash Gateway Plugin" v. 2.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("jazzcash-woocommerce-gateway.php" instead of "woocommerce-jazzcash-gateway.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected13,396 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP441,1065,66913,250
CSS161173
HTML10458
JavaScript10115

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity77.57
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity9.00
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes00.00%
▷ Concrete classes35100.00%
▷ Final classes00.00%
Methods335
▷ Static methods00.00%
▷ Public methods33198.81%
▷ Protected methods41.19%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/mw.png1.58KB1.48KB▼ 6.49%
assets/jazzcash-logo-200x200.png22.11KB7.19KB▼ 67.46%
assets/jazz-cash.png102.48KB32.51KB▼ 68.28%
assets/cd.png2.32KB1.61KB▼ 30.56%
assets/sh.png1.65KB1.43KB▼ 13.52%