10% woo-pardakht

Code Review | Pardakht Cash On Delivery And Online Payment For Woocommerce

WordPress plugin Pardakht Cash On Delivery And Online Payment For Woocommerce scored10%from 54 tests.

About plugin

  • Plugin page: woo-pardakht
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2015
  • Latest release: Aug 10, 2016
  • Number of updates: 37
  • Update frequency: every 9.1 days
  • Top authors: miladkiaei (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,624 total downloads

Benchmarks

Plugin footprint 58% 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 validation failed for this plugin
    • > Warning in wp-content/plugins/woo-pardakht/index.php+159
    Use of undefined constant PR_schedule_time - assumed 'PR_schedule_time' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.01MB] [CPU: ▼10.18ms] Passed 4 tests

Server-side resources used by Pardakht Cash On Delivery And Online Payment For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.22 ▲3.69
Dashboard /wp-admin3.31 ▼0.0447.77 ▼12.96
Posts /wp-admin/edit.php3.36 ▲0.0042.85 ▼4.47
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.18 ▼20.15
Media Library /wp-admin/upload.php3.23 ▲0.0034.80 ▼3.12

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Pardakht Cash On Delivery And Online Payment For Woocommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.72 ▲0.481.79 ▼0.1442.11 ▲4.19
Dashboard /wp-admin2,195 ▲205.55 ▼0.1086.72 ▼12.4140.97 ▼1.24
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0034.06 ▼1.4232.97 ▼2.00
Add New Post /wp-admin/post-new.php1,526 ▼523.71 ▲0.64675.55 ▲41.9654.92 ▲5.27
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0293.68 ▼0.7741.57 ▼4.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • woocommerce_status_options
    • can_compress_scripts
    • db_upgraded
    • woocommerce_cod_settings

Smoke tests 75% from 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 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 items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-pardakht/epay.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Please a description for screenshot #4 in woo-pardakht/assets to your readme.txt
The official readme.txt might help

woo-pardakht/index.php 85% from 13 tests

This is the main PHP file of "Pardakht Cash On Delivery And Online Payment For Woocommerce" version 2.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 244 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-pardakht.php" instead of "index.php")

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
There were no executable files found in this plugin7,633 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10450464,930
JavaScript11302,703

PHP code Passed 2 tests

Analyzing 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.48
Average class complexity34.00
▷ Minimum class complexity13.00
▷ Maximum class complexity38.00
Average method complexity6.13
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods45
▷ Static methods00.00%
▷ Public methods45100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions45
▷ Named functions4191.11%
▷ Anonymous functions48.89%
Constants15
▷ Global constants15100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.35MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-4.png149.40KB52.84KB▼ 64.63%
assets/screenshot-3.png50.28KB16.16KB▼ 67.85%
assets/screenshot-1.png63.75KB20.94KB▼ 67.15%
assets/screenshot-2.png73.50KB21.98KB▼ 70.10%
icon.png19.73KB1.44KB▼ 92.71%