68% bank-saderat-edd-gateway

Code Review | Bank Parsian EDD gateway

WordPress plugin Bank Parsian EDD gateway scored 68% from 54 tests.

About plugin

  • Plugin page: bank-saderat-edd-...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.1
  • WordPress version: 6.3.1
  • First release: Dec 16, 2015
  • Latest release: Jan 17, 2017
  • Number of updates: 3
  • Update frequency: every 132.7 days
  • Top authors: ham3da (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,405 total downloads

Benchmarks

Plugin footprint 65% 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: ▼1.23MB] [CPU: ▼43.43ms] Passed 4 tests

Analyzing server-side resources used by Bank Parsian EDD gateway
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▼0.7213.22 ▼26.54
Dashboard /wp-admin2.78 ▼0.5315.37 ▼34.75
Posts /wp-admin/edit.php2.78 ▼0.5814.52 ▼31.12
Add New Post /wp-admin/post-new.php2.78 ▼3.1114.56 ▼81.31
Media Library /wp-admin/upload.php2.78 ▼0.4515.37 ▼14.63
خبرنامه /wp-admin/admin.php?page=saderat_bank_gate_news2.7816.01
بانک صادرات /wp-admin/admin.php?page=saderat_bank_gate2.7814.41
درباره ما /wp-admin/admin.php?page=saderat_bank_gate_about2.7815.93

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Bank Parsian EDD gateway
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.39 ▼1.021.79 ▼0.0442.41 ▼7.27
Dashboard /wp-admin2,244 ▲565.84 ▼0.05100.57 ▼14.0184.58 ▲37.26
Posts /wp-admin/edit.php2,127 ▲381.97 ▼0.0437.69 ▲3.3340.52 ▲7.15
Add New Post /wp-admin/post-new.php1,562 ▲2821.97 ▼1.14733.49 ▲44.8853.94 ▼0.13
Media Library /wp-admin/upload.php1,423 ▲354.21 ▼0.01106.15 ▼0.9185.31 ▲39.85
خبرنامه /wp-admin/admin.php?page=saderat_bank_gate_news8402.0722.7449.18
بانک صادرات /wp-admin/admin.php?page=saderat_bank_gate8312.0122.7233.45
درباره ما /wp-admin/admin.php?page=saderat_bank_gate_about8202.0228.2537.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/bank-saderat-edd-gateway/Saderat_for_EDD.php+225
    Trying to access array offset on value of type null
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=saderat_bank_gate_about
    • > Notice in wp-content/plugins/bank-saderat-edd-gateway/Saderat_for_EDD.php+227
    Trying to access array offset on value of type null

SRP 50% from 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
Please fix the following
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.soap_fault.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.soap_transport_http.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.wsdl.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.soap_parser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.xmlschema.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.soap_val.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'nusoap_base' not found in wp-content/plugins/bank-saderat-edd-gateway/lib/class.soap_server.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bank-saderat-edd-gateway/news.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bank-saderat-edd-gateway/saderat.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bank-saderat-edd-gateway/menu_setup.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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 require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #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 parsian Merchant ID , username and password fields.)
Please take inspiration from this readme.txt

bank-saderat-edd-gateway/Saderat_for_EDD.php 85% from 13 tests

Analyzing the main PHP file in "Bank Parsian EDD gateway" version 1.1
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-saderat-edd-gateway.php" instead of "Saderat_for_EDD.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 178 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected11,545 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP179675,10511,545

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity78.56
▷ 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%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.16MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png21.92KB3.16KB▼ 85.58%
screenshot-2.png42.25KB11.56KB▼ 72.63%
screenshot-1.png61.31KB15.81KB▼ 74.21%
screenshot-3.png27.42KB5.62KB▼ 79.50%
images/icon.png14.42KB0.44KB▼ 96.97%