90% paystar-payment-for-gravityforms

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

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

About plugin

  • Plugin page: paystar-payment-f...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Dec 4, 2021
  • Latest release: May 15, 2022
  • Number of updates: 4
  • Update frequency: every 41.2 days
  • Top authors: mrfazeli666paystar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /309 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.78MB] [CPU: ▲4.05ms] Passed 4 tests

Server-side resources used by درگاه پرداخت پی استار برای افزونه گرویتی فرمز
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7846.28 ▲4.20
Dashboard /wp-admin4.08 ▲0.7855.00 ▲3.95
Posts /wp-admin/edit.php4.19 ▲0.8451.94 ▲4.66
Add New Post /wp-admin/post-new.php6.66 ▲0.7893.88 ▲3.39
Media Library /wp-admin/upload.php4.00 ▲0.7743.26 ▲7.28

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for درگاه پرداخت پی استار برای افزونه گرویتی فرمز
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲4914.28 ▼0.281.75 ▼0.0046.95 ▲2.84
Dashboard /wp-admin2,198 ▲245.56 ▼0.0189.17 ▼22.4240.47 ▼6.11
Posts /wp-admin/edit.php2,106 ▲62.03 ▲0.0337.70 ▲1.5835.56 ▲0.07
Add New Post /wp-admin/post-new.php1,532 ▲423.28 ▲0.32638.80 ▼34.5152.35 ▼7.58
Media Library /wp-admin/upload.php1,406 ▲64.22 ▲0.0598.58 ▼7.9444.85 ▼1.72

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: gateway, wordpress, paystar, payment, gravityforms

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

"درگاه پرداخت پی استار برای افزونه گرویتی فرمز" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("paystar-payment-for-gravityforms.php" instead of "paystar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected4,424 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4363503,919
PO File1205211505

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity145.25
▷ Minimum class complexity9.00
▷ Maximum class complexity333.00
Average method complexity8.90
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods73
▷ Static methods6994.52%
▷ Public methods5473.97%
▷ Protected methods34.11%
▷ Private methods1621.92%
Functions0
▷ Named functions00.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%