10% paystar-payment-for-learnpress

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

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

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /276 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Error in wp-content/plugins/paystar-payment-for-learnpress/paystar.php+50
    Uncaught Error: Class 'LP_Gateway_Abstract' not found in wp-content/plugins/paystar-payment-for-learnpress/paystar.php:50
    Stack trace:
    #0 wp-admin/includes/plugin.php(2318): include_once()
    #1 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.74ms] Passed 4 tests

This is a short check of server-side resources used by درگاه پرداخت پی استار برای افزونه لرن.پرس وردپرس
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.60 ▼10.09
Dashboard /wp-admin3.31 ▲0.0045.86 ▼3.28
Posts /wp-admin/edit.php3.36 ▲0.0046.29 ▼1.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.81 ▼4.25
Media Library /wp-admin/upload.php3.23 ▲0.0039.29 ▲4.82

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

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

Browser metrics Passed 4 tests

A check of browser resources used by درگاه پرداخت پی استار برای افزونه لرن.پرس وردپرس
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6813.20 ▼1.551.68 ▼0.7642.01 ▲1.10
Dashboard /wp-admin2,206 ▲185.80 ▼0.06107.15 ▲2.9638.45 ▼4.92
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0334.75 ▼7.2834.86 ▼0.91
Add New Post /wp-admin/post-new.php1,534 ▲2023.34 ▲5.86657.09 ▼47.3651.10 ▼2.82
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.02101.78 ▲2.0642.93 ▼2.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/paystar-payment-for-learnpress/paystar.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: learnpress, payment, course, wordpress, paystar...

paystar-payment-for-learnpress/paystar.php 92% 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
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paystar-payment-for-learnpress.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
Good job! No executable or dangerous file extensions detected278 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22110243
PO File19935

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity13.00
▷ Minimum class complexity9.00
▷ Maximum class complexity17.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.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.png2.30KB2.32KB0.00%