10% bank-mellat-edd-gateway

Code Review | Bank mellat EDD gateway

WordPress plugin Bank mellat EDD gateway scored10%from 54 tests.

About plugin

  • Plugin page: bank-mellat-edd-g...
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Aug 29, 2013
  • Latest release: Apr 4, 2018
  • Number of updates: 14
  • Update frequency: every 119.9 days
  • Top authors: picor.ir (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

70+ active /12,949 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/bank-mellat-edd-gateway/lib/nusoap.php+7183
    Methods with the same name as their class will not be constructors in a future version of PHP; nusoap_client has a deprecated constructor

Server metrics [RAM: ▼1.23MB] [CPU: ▼39.79ms] Passed 4 tests

Server-side resources used by Bank mellat EDD gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7214.47 ▼23.31
Dashboard /wp-admin2.78 ▼0.5215.02 ▼31.08
Posts /wp-admin/edit.php2.78 ▼0.5815.91 ▼27.26
Add New Post /wp-admin/post-new.php2.78 ▼3.1113.24 ▼77.51
Media Library /wp-admin/upload.php2.78 ▼0.4516.53 ▼20.37
پکیج های آموزشی /wp-admin/admin.php?page=mellat_bank_gate_packages2.7814.46
نسخه طلایی /wp-admin/admin.php?page=mellat_bank_gate2.7814.34
افزونه و قالب ها /wp-admin/admin.php?page=mellat_bank_gate_plugins_themes2.7816.53
آموزش های EDD /wp-admin/admin.php?page=mellat_bank_gate_tutorials2.7815.05
باگ های امنیتی /wp-admin/admin.php?page=mellat_bank_gate_bugs2.7816.41

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Bank mellat EDD gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲10713.70 ▼1.061.64 ▲0.0437.42 ▼4.87
Dashboard /wp-admin2,251 ▲605.84 ▲0.96110.30 ▼4.8281.32 ▲36.56
Posts /wp-admin/edit.php2,134 ▲452.01 ▼0.0337.61 ▲0.7141.22 ▲9.85
Add New Post /wp-admin/post-new.php1,712 ▲17024.81 ▲6.66738.79 ▲97.0257.27 ▲6.50
Media Library /wp-admin/upload.php1,433 ▲424.21 ▲0.0498.55 ▼8.4974.31 ▲29.46
پکیج های آموزشی /wp-admin/admin.php?page=mellat_bank_gate_packages9772.0225.1856.46
نسخه طلایی /wp-admin/admin.php?page=mellat_bank_gate8362.0223.2735.79
افزونه و قالب ها /wp-admin/admin.php?page=mellat_bank_gate_plugins_themes1,1712.0123.7545.45
آموزش های EDD /wp-admin/admin.php?page=mellat_bank_gate_tutorials9752.0225.2339.93
باگ های امنیتی /wp-admin/admin.php?page=mellat_bank_gate_bugs9442.0222.0342.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/bank-mellat-edd-gateway/Mellat_for_EDD.php+144
    Trying to access array offset on value of type null
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=mellat_bank_gate_bugs
    • > Notice in wp-content/plugins/bank-mellat-edd-gateway/Mellat_for_EDD.php+146
    Trying to access array offset on value of type null

SRP 50% 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
Almost there! Just fix the following items
  • 17× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-mellat-edd-gateway/lib/class.soapclient.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-mellat-edd-gateway/lib/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bank-mellat-edd-gateway/pluginsthemes.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bank-mellat-edd-gateway/gold.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bank-mellat-edd-gateway/menu_setup.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-mellat-edd-gateway/lib/class.soap_transport_http.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'Mail/mimeDecode.php' (include_path='.:/usr/share/php') in wp-content/plugins/bank-mellat-edd-gateway/lib/nusoapmime.php on line 42
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bank-mellat-edd-gateway/bugs.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bank-mellat-edd-gateway/menu_setup.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-mellat-edd-gateway/lib/class.soap_parser.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Screenshots: Please 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 mellat terminal , username and password fields.), #4 (Screen shot (screenshot-4.png) easy digital downloads sms panel), #5 (Screen shot (screenshot-5.png) sms setting easy digital downloads)
You can take inspiration from this readme.txt

bank-mellat-edd-gateway/Mellat_for_EDD.php 85% from 13 tests

The principal PHP file in "Bank mellat EDD gateway" v. 4.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bank-mellat-edd-gateway.php" instead of "Mellat_for_EDD.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 211 characters long)

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
No dangerous file extensions were detected12,066 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP199775,14112,066

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity78.53
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity9.24
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods320
▷ Static methods00.00%
▷ Public methods320100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png18.65KB16.98KB▼ 8.95%
screenshot-3.png6.12KB3.29KB▼ 46.19%
images/tutorials/edd-software-license-manager.png34.47KB18.89KB▼ 45.20%
screenshot-4.png13.84KB6.31KB▼ 54.39%
screenshot-1.png14.96KB6.72KB▼ 55.09%