90% zibal-payment-gateway-for-gravity-forms

Code Review | Zibal Payment Gateway for Gravity Forms

WordPress plugin Zibal Payment Gateway for Gravity Forms scored90%from 54 tests.

About plugin

  • Plugin page: zibal-payment-gat...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Feb 17, 2021
  • Latest release: Jun 20, 2022
  • Number of updates: 5
  • Update frequency: every 97.6 days
  • Top authors: mzamanzadah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,799 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.72MB] [CPU: ▼6.99ms] Passed 4 tests

A check of server-side resources used by Zibal Payment Gateway for Gravity Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲0.7343.73 ▲0.28
Dashboard /wp-admin4.03 ▲0.6947.63 ▼17.87
Posts /wp-admin/edit.php4.14 ▲0.7951.47 ▲6.14
Add New Post /wp-admin/post-new.php6.61 ▲0.7380.92 ▼15.89
Media Library /wp-admin/upload.php3.95 ▲0.7339.32 ▲5.54

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Zibal Payment Gateway for Gravity Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲3613.20 ▼1.194.33 ▲2.1341.20 ▼2.40
Dashboard /wp-admin2,213 ▲254.85 ▼1.03111.87 ▼2.4447.87 ▼0.99
Posts /wp-admin/edit.php2,098 ▲62.03 ▲0.0339.71 ▲2.9441.99 ▲8.85
Add New Post /wp-admin/post-new.php1,549 ▲3523.00 ▲5.58661.66 ▼18.4258.11 ▼2.07
Media Library /wp-admin/upload.php1,398 ▲104.22 ▼0.05101.53 ▼12.2845.95 ▼2.56

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: gravityforms, payment, zibal, gateway

zibal-payment-gateway-for-gravity-forms/index.php 92% from 13 tests

The main PHP script in "Zibal Payment Gateway for Gravity Forms" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("zibal-payment-gateway-for-gravity-forms.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin3,820 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4771543,813
Markdown1307

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity193.67
▷ Minimum class complexity29.00
▷ Maximum class complexity342.00
Average method complexity9.38
▷ Minimum method complexity1.00
▷ Maximum method complexity75.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods69
▷ Static methods69100.00%
▷ Public methods5173.91%
▷ Protected methods34.35%
▷ Private methods1521.74%
Functions0
▷ Named functions00.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 files were detected