94% zaakpay-payment-gateway

Code Review | Zaakpay Payment Gateway

WordPress plugin Zaakpay Payment Gateway scored 94% from 54 tests.

About plugin

  • Plugin page: zaakpay-payment-g...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-5.8
  • WordPress version: 5.9.2
  • First release: Jul 17, 2020
  • Latest release: Jul 23, 2021
  • Number of updates: 10
  • Update frequency: every 37.8 days
  • Top authors: harshpujarimbk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 740 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼298.97ms] Passed 4 tests

Analyzing server-side resources used by Zaakpay Payment Gateway
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.1954.19 ▼4.50
Dashboard /wp-admin3.53 ▲0.1234.31 ▼0.60
Posts /wp-admin/edit.php3.76 ▲0.1281.71 ▲45.27
Add New Post /wp-admin/post-new.php7.00 ▲0.0398.36 ▼1,196.46
Media Library /wp-admin/upload.php3.41 ▲0.1229.65 ▲5.67

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Zaakpay Payment Gateway: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,794 ▲4015.56 ▼0.206.04 ▼0.422.43 ▼0.57
Dashboard /wp-admin2,906 ▲526.07 ▼0.09117.23 ▼29.32157.39 ▼54.95
Posts /wp-admin/edit.php2,700 ▲93.23 ▼0.0165.31 ▼3.83147.44 ▼41.52
Add New Post /wp-admin/post-new.php1,718 ▼3720.77 ▲3.52471.95 ▲87.29177.02 ▼13.56
Media Library /wp-admin/upload.php1,712 ▲145.55 ▲0.01141.90 ▼0.61183.81 ▼3.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× 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/zaakpay-payment-gateway/woocommerce-zpay.php:14

User-side errors Passed 1 test

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

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
6 plugin tags: woocommerce payment gateway, woocommerce plugin, woocommerce zaakpay payment gateway, woocommerce, zaakpay...

zaakpay-payment-gateway/woocommerce-zpay.php 92% from 13 tests

"Zaakpay Payment Gateway" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zaakpay-payment-gateway.php" instead of "woocommerce-zpay.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin703 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP28457694
XML1009

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity30.50
▷ Minimum class complexity6.00
▷ Maximum class complexity55.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods522.73%
▷ Public methods1881.82%
▷ Protected methods00.00%
▷ Private methods418.18%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
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
images/logo.png3.89KB2.19KB▼ 43.85%