90% zibal-payment-gateway-for-woocommerce

Code Review | Zibal Payment Gateway for Woocommerce

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

About plugin

  • Plugin page: zibal-payment-gat...
  • Plugin version: 1.6
  • 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: 8
  • Update frequency: every 138.8 days
  • Top authors: mzamanzadah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /9,715 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▲1.77ms] Passed 4 tests

An overview of server-side resources used by Zibal Payment Gateway for Woocommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.71 ▲2.07
Dashboard /wp-admin3.31 ▲0.0146.58 ▲1.98
Posts /wp-admin/edit.php3.36 ▲0.0049.21 ▲3.99
Add New Post /wp-admin/post-new.php5.89 ▲0.00105.16 ▲20.84
Media Library /wp-admin/upload.php3.23 ▲0.0032.20 ▼0.97

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Zibal Payment Gateway for Woocommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.74 ▲0.091.80 ▲0.1043.11 ▲4.58
Dashboard /wp-admin2,203 ▲284.91 ▲0.00117.92 ▲11.9454.05 ▲12.92
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0640.82 ▲4.3435.40 ▲2.87
Add New Post /wp-admin/post-new.php1,523 ▼1023.55 ▲0.35595.46 ▼68.6251.15 ▼1.23
Media Library /wp-admin/upload.php1,388 ▼04.23 ▲0.0797.37 ▼5.8342.17 ▼2.03

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The SRP test was a success

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 on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: payment, woocommerce, gateway, zibal

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

"Zibal Payment Gateway for Woocommerce" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zibal-payment-gateway-for-woocommerce.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected341 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29731341

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity60.00
▷ Minimum class complexity60.00
▷ Maximum class complexity60.00
Average method complexity9.43
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png1.24KB1.42KB0.00%