62% bank-melli-edd-gateway

Code Review | Bank Melli EDD gateway

WordPress plugin Bank Melli EDD gateway scored62%from 54 tests.

About plugin

  • Plugin page: bank-melli-edd-ga...
  • Plugin version: 1.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 15, 2016
  • Latest release: Aug 13, 2018
  • Number of updates: 9
  • Update frequency: every 97.9 days
  • Top authors: ham3da (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

30+ active /4,160 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.19MB] [CPU: ▼43.91ms] Passed 4 tests

A check of server-side resources used by Bank Melli EDD gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.78 ▼0.6813.41 ▼22.99
Dashboard /wp-admin2.82 ▼0.4915.37 ▼33.26
Posts /wp-admin/edit.php2.82 ▼0.5417.57 ▼28.11
Add New Post /wp-admin/post-new.php2.82 ▼3.0721.40 ▼91.26
Media Library /wp-admin/upload.php2.82 ▼0.4116.45 ▼15.45
About /wp-admin/admin.php?page=melli_bank_gate_about2.8217.01
Sadad for EDD /wp-admin/admin.php?page=melli_bank_gate2.8216.29
Newsletters /wp-admin/admin.php?page=melli_bank_gate_news2.8215.55

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by Bank Melli EDD gateway
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.29 ▼1.021.79 ▲0.1640.45 ▲0.79
Dashboard /wp-admin2,236 ▲485.83 ▲0.9395.89 ▼5.9475.04 ▲30.67
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0137.61 ▲2.3434.34 ▼0.34
Add New Post /wp-admin/post-new.php1,548 ▲2018.29 ▼0.10701.25 ▲94.3763.47 ▲9.53
Media Library /wp-admin/upload.php1,421 ▲364.22 ▲0.0094.37 ▼0.4645.54 ▼0.40
About /wp-admin/admin.php?page=melli_bank_gate_about8152.0226.3843.22
Sadad for EDD /wp-admin/admin.php?page=melli_bank_gate8572.1431.4143.96
Newsletters /wp-admin/admin.php?page=melli_bank_gate_news8352.0222.1837.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/bank-melli-edd-gateway/Melli_for_EDD.php+174
    Trying to access array offset on value of type null
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=melli_bank_gate_news
    • > Notice in wp-content/plugins/bank-melli-edd-gateway/Melli_for_EDD.php+176
    Trying to access array offset on value of type null

SRP 0% from 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 following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/bank-melli-edd-gateway/Melli_for_EDD.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bank-melli-edd-gateway/news.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bank-melli-edd-gateway/melli.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bank-melli-edd-gateway/about.php:13

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


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Screen shot (screenshot-1.png) English Payement gateways setting.), #2 (Screen shot (screenshot-2.png) Persian Payement gateways setting.), #3 (Screen shot (screenshot-3.png) Bank melli Merchant ID , username and password fields.)
You can take inspiration from this readme.txt

bank-melli-edd-gateway/Melli_for_EDD.php 85% from 13 tests

The main PHP file in "Bank Melli EDD gateway" ver. 1.5.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("bank-melli-edd-gateway.php" instead of "Melli_for_EDD.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected455 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PO File1232376

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions12100.00%
▷ Anonymous functions00.00%
▷ 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
5 PNG files occupy 0.12MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png14.72KB6.79KB▼ 53.85%
screenshot-2.png40.43KB15.24KB▼ 62.30%
images/logo.png21.92KB3.16KB▼ 85.58%
screenshot-1.png42.81KB15.58KB▼ 63.62%