79% mellat-woocommerce

Code Review | درگاه پرداخت بانک ملت ووکامرس

WordPress plugin درگاه پرداخت بانک ملت ووکامرس scored79%from 54 tests.

About plugin

  • Plugin page: mellat-woocommerce
  • Plugin version: 4.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Dec 10, 2021
  • Number of updates: 18
  • Update frequency: every 135.0 days
  • Top authors: Persianscript (88.89%)hannanstd (16.67%)

Code review

54 tests

User reviews

10 reviews

Install metrics

6,000+ active /120,829 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: ▼0.92MB] [CPU: ▼34.24ms] Passed 4 tests

This is a short check of server-side resources used by درگاه پرداخت بانک ملت ووکامرس
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.77 ▼3.49
Dashboard /wp-admin3.03 ▼0.2827.73 ▼26.04
Posts /wp-admin/edit.php3.03 ▼0.3328.85 ▼19.54
Add New Post /wp-admin/post-new.php3.03 ▼2.8626.76 ▼76.86
Media Library /wp-admin/upload.php3.03 ▼0.2021.79 ▼14.50

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for درگاه پرداخت بانک ملت ووکامرس
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.56 ▼0.171.68 ▼0.3742.88 ▼0.11
Dashboard /wp-admin2,198 ▲185.59 ▲0.0087.68 ▼12.2240.35 ▼3.68
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0040.34 ▲1.0936.62 ▼2.64
Add New Post /wp-admin/post-new.php1,535 ▲918.63 ▼4.59650.94 ▼1.0564.47 ▲10.83
Media Library /wp-admin/upload.php1,403 ▲34.13 ▼0.03102.41 ▼3.4942.13 ▼3.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'pwmellat_dismiss_notice_action' not found or invalid function name
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (Settings page), #2 (payment page)
Please take inspiration from this readme.txt

mellat-woocommerce/index.php 85% from 13 tests

"درگاه پرداخت بانک ملت ووکامرس" version 4.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Plugin Name: A shorter plugin name is better (currently 89 characters long instead of max. 70)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("mellat-woocommerce.php" instead of "index.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 detected6,181 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP35032,4196,181

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity99.40
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity10.46
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods156
▷ Static methods10.64%
▷ Public methods15599.36%
▷ Protected methods00.00%
▷ Private methods10.64%
Functions7
▷ Named functions7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo.png0.91KB0.72KB▼ 20.88%