84% paystar-payment-for-woocommerce

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

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

About plugin

  • Plugin page: paystar-payment-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2021
  • Latest release: Mar 7, 2023
  • Number of updates: 24
  • Update frequency: every 22.0 days
  • Top authors: mrfazeli666paystar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /556 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.25ms] Passed 4 tests

Server-side resources used by متد پرداخت درگاه پی استار برای ووکامرس
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.23 ▲1.86
Dashboard /wp-admin3.35 ▲0.0047.05 ▼18.10
Posts /wp-admin/edit.php3.40 ▲0.0447.55 ▲3.60
Add New Post /wp-admin/post-new.php5.93 ▲0.0489.16 ▲2.39
Media Library /wp-admin/upload.php3.28 ▲0.0433.97 ▲0.85

Server storage [IO: ▲0.02MB] [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, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for متد پرداخت درگاه پی استار برای ووکامرس
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.072.12 ▲0.1943.74 ▲0.88
Dashboard /wp-admin2,203 ▲155.83 ▼0.0797.81 ▼17.8739.91 ▼2.56
Posts /wp-admin/edit.php2,086 ▼32.01 ▲0.0139.80 ▲4.4237.35 ▲2.75
Add New Post /wp-admin/post-new.php1,533 ▼323.10 ▼0.33620.18 ▼57.9758.31 ▼6.20
Media Library /wp-admin/upload.php1,388 ▲64.20 ▼0.0395.19 ▼1.8242.66 ▲1.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paystar-payment-for-woocommerce/paystar.php:212

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce, payment, paystar, gateway, wordpress

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

"متد پرداخت درگاه پی استار برای ووکامرس" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paystar-payment-for-woocommerce.php" instead of "paystar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin320 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21310256
PO File1212164

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.50
▷ Minimum class complexity10.00
▷ Maximum class complexity15.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png2.30KB2.32KB0.00%