84% paystar-pay-form

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

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

About plugin

  • Plugin page: paystar-pay-form
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 3, 2021
  • Latest release: May 15, 2022
  • Number of updates: 4
  • Update frequency: every 48.2 days
  • Top authors: mrfazeli666paystar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /286 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.38ms] Passed 4 tests

Analyzing server-side resources used by فرم پرداخت درگاه پی استار برای وردپرس
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0246.36 ▲7.68
Dashboard /wp-admin3.33 ▲0.0343.50 ▼6.05
Posts /wp-admin/edit.php3.38 ▲0.0248.13 ▲0.52
Add New Post /wp-admin/post-new.php5.91 ▲0.0277.83 ▼15.86
Media Library /wp-admin/upload.php3.25 ▲0.0235.34 ▼4.12

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by فرم پرداخت درگاه پی استار برای وردپرس
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.17 ▼1.181.63 ▼0.1443.34 ▲4.59
Dashboard /wp-admin2,221 ▲335.82 ▲0.91109.40 ▲5.7973.00 ▲27.74
Posts /wp-admin/edit.php2,110 ▲212.02 ▼0.0338.58 ▲0.9536.12 ▼0.72
Add New Post /wp-admin/post-new.php1,527 ▲1323.27 ▲5.61738.20 ▲24.5363.15 ▲5.18
Media Library /wp-admin/upload.php1,403 ▲184.20 ▲0.0895.97 ▼21.8481.74 ▲33.48

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 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
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/paystar-pay-form/templates/form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/paystar-pay-form/paystar.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/paystar-pay-form/templates/setting.php:2

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 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: paystar, payment, gateway, form, donate...

paystar-pay-form/paystar.php 92% from 13 tests

The primary PHP file in "فرم پرداخت درگاه پی استار برای وردپرس" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("paystar-pay-form.php" instead of "paystar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin331 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP41410222
CSS19055
PO File1181854

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png0.74KB0.67KB▼ 8.48%