89% vandapardakht-payment-for-woocommerce

Code Review | VandaPardakht.com Payment Method for WooCommerce

WordPress plugin VandaPardakht.com Payment Method for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: vandapardakht-pay...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2022
  • Latest release: Apr 25, 2022
  • Number of updates: 10
  • Update frequency: every 6.1 days
  • Top authors: vandapardakht (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /278 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by VandaPardakht.com Payment Method for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.44 ▲5.51
Dashboard /wp-admin3.31 ▲0.0144.12 ▼1.05
Posts /wp-admin/edit.php3.36 ▲0.0045.88 ▼4.35
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.60 ▼11.96
Media Library /wp-admin/upload.php3.23 ▲0.0034.63 ▲3.65

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
vandapardakht_do_activation_redirect
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for VandaPardakht.com Payment Method for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.53 ▲0.261.69 ▲0.0943.17 ▲7.03
Dashboard /wp-admin2,195 ▲185.62 ▲0.0584.46 ▼16.6035.86 ▼6.27
Posts /wp-admin/edit.php2,100 ▼01.95 ▼0.0739.14 ▼0.2836.54 ▼1.81
Add New Post /wp-admin/post-new.php1,526 ▼923.16 ▲4.84665.06 ▲31.8153.17 ▼12.94
Media Library /wp-admin/upload.php1,400 ▼34.21 ▼0.0796.58 ▼2.9341.05 ▼0.73

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • vandapardakht_do_activation_redirect
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

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
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
You can take inspiration from this readme.txt

vandapardakht-payment-for-woocommerce/vandapardakht.php 92% from 13 tests

The entry point to "VandaPardakht.com Payment Method for WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("vandapardakht-payment-for-woocommerce.php" instead of "vandapardakht.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
Success! There were no dangerous files found in this plugin386 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22013311
PO File1222275

PHP code Passed 2 tests

An overview 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.42
Average class complexity24.00
▷ Minimum class complexity15.00
▷ Maximum class complexity33.00
Average method complexity4.54
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.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
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
images/logo.png5.03KB2.71KB▼ 46.06%