90% paystar-payment-for-rcp

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

WordPress plugin درگاه پرداخت پی استار برای افزونه Restrict Content Pro 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: Oct 29, 2021
  • Latest release: Apr 15, 2022
  • Number of updates: 3
  • Update frequency: every 56.0 days
  • Top authors: mrfazeli666paystar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /297 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by درگاه پرداخت پی استار برای افزونه Restrict Content Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.45 ▼0.86
Dashboard /wp-admin3.32 ▼0.0248.68 ▼10.06
Posts /wp-admin/edit.php3.38 ▲0.0244.08 ▼5.73
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.89 ▼13.31
Media Library /wp-admin/upload.php3.25 ▲0.0233.67 ▼0.04

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for درگاه پرداخت پی استار برای افزونه Restrict Content Pro
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.37 ▲0.022.04 ▲0.3544.53 ▲4.17
Dashboard /wp-admin2,195 ▲155.52 ▼0.1099.11 ▲14.4143.14 ▲0.98
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0334.44 ▼7.0635.31 ▼0.32
Add New Post /wp-admin/post-new.php1,526 ▼323.18 ▲0.18646.99 ▼27.2654.08 ▲1.96
Media Library /wp-admin/upload.php1,394 ▼64.26 ▲0.11102.48 ▲2.1244.12 ▲0.22

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% 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: payment, rcp, restrict content pro, paystar, gateway...

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

The main PHP script in "درگاه پرداخت پی استار برای افزونه Restrict Content Pro" version 1.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("paystar-payment-for-rcp.php" instead of "paystar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin308 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2911226
PO File2242482

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.50
▷ Minimum class complexity9.00
▷ Maximum class complexity18.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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%