84% zibal-payment-gateway-for-easy-digital-downloads

Code Review | Zibal Payment Gateway for Easy Digital Downloads

WordPress plugin Zibal Payment Gateway for Easy Digital Downloads scored84%from 54 tests.

About plugin

  • Plugin page: zibal-payment-gat...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.0
  • WordPress version: 6.3.1
  • First release: Jun 7, 2019
  • Latest release: Jun 20, 2022
  • Number of updates: 9
  • Update frequency: every 123.2 days
  • Top authors: mzamanzadah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,797 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.73ms] Passed 4 tests

Server-side resources used by Zibal Payment Gateway for Easy Digital Downloads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.95 ▼8.17
Dashboard /wp-admin3.37 ▲0.0647.36 ▼1.38
Posts /wp-admin/edit.php3.42 ▲0.0646.56 ▼1.91
Add New Post /wp-admin/post-new.php5.95 ▲0.0690.59 ▼11.46
Media Library /wp-admin/upload.php3.29 ▲0.0635.53 ▲1.24

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Zibal Payment Gateway for Easy Digital Downloads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.18 ▼1.211.60 ▼0.2943.92 ▼0.73
Dashboard /wp-admin2,209 ▲214.87 ▼0.04108.73 ▲8.5242.52 ▼2.91
Posts /wp-admin/edit.php2,089 ▲32.01 ▼0.0338.52 ▲3.9136.00 ▲1.81
Add New Post /wp-admin/post-new.php1,514 ▼2817.45 ▼0.95595.35 ▼30.6052.83 ▼2.58
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0496.06 ▼10.2639.80 ▼4.53

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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 fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zibal-payment-gateway-for-easy-digital-downloads/includes/toman-currency.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/zibal-payment-gateway-for-easy-digital-downloads/includes/toman-currency.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: zibal, easydigitaldownloads, edd, payment, gateway

zibal-payment-gateway-for-easy-digital-downloads/edd-zibal.php 92% from 13 tests

The main file in "Zibal Payment Gateway for Easy Digital Downloads" v. 1.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("zibal-payment-gateway-for-easy-digital-downloads.php" instead of "edd-zibal.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
Good job! No executable or dangerous file extensions detected237 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP36790237

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin