84% tomanpay-ipg-method-for-woocommerce

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

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

About plugin

  • Plugin page: tomanpay-ipg-meth...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Jun 10, 2023
  • Latest release: Jun 10, 2023
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: mrfazeli666tomanpay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /78 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼10.11ms] Passed 4 tests

A check of server-side resources used by متد درگاه پرداخت آنلاین تومن برای ووکامرس
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0735.97 ▼3.60
Dashboard /wp-admin3.38 ▲0.0844.74 ▼5.30
Posts /wp-admin/edit.php3.43 ▲0.0743.55 ▼8.68
Add New Post /wp-admin/post-new.php5.96 ▲0.0782.62 ▼22.84
Media Library /wp-admin/upload.php3.30 ▲0.0733.46 ▲0.54

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
tomanipg_do_activation_redirect
can_compress_scripts

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 ▲5413.31 ▼1.294.42 ▲2.6841.05 ▼3.56
Dashboard /wp-admin2,206 ▲185.83 ▼0.0394.70 ▼23.4639.35 ▼6.06
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0035.60 ▼2.8632.01 ▼0.96
Add New Post /wp-admin/post-new.php1,542 ▲2818.09 ▲0.45644.95 ▼34.0859.64 ▲1.13
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0095.55 ▼4.5439.95 ▼5.91

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • tomanipg_do_activation_redirect

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tomanpay-ipg-method-for-woocommerce/toman-ipg.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: toman, woocommerce, payment, gateway, wordpress...

tomanpay-ipg-method-for-woocommerce/toman-ipg.php 85% from 13 tests

The main PHP file in "متد درگاه پرداخت آنلاین تومن برای ووکامرس" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tomanpay-ipg-method-for-woocommerce.php" instead of "toman-ipg.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin390 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP21910310
PO File1292980

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity40.00
▷ Minimum class complexity40.00
▷ Maximum class complexity40.00
Average method complexity5.33
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions111.11%
▷ Anonymous functions888.89%
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
images/logo.png4.21KB1.57KB▼ 62.60%