84% paystar-card-payment-for-woocommerce

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

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

About plugin

  • Plugin page: paystar-card-paym...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 6.3.1
  • First release: Nov 5, 2021
  • Latest release: May 15, 2022
  • Number of updates: 8
  • Update frequency: every 23.9 days
  • Top authors: mrfazeli666paystar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /540 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.34ms] Passed 4 tests

Server-side resources used by درگاه کارت به کارت پی استار برای افزونه ووکامرس وردپرس
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.04 ▼8.01
Dashboard /wp-admin3.34 ▲0.0446.32 ▼2.36
Posts /wp-admin/edit.php3.39 ▲0.0348.75 ▼6.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.02 ▼8.16
Media Library /wp-admin/upload.php3.26 ▲0.0339.61 ▲2.11

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by درگاه کارت به کارت پی استار برای افزونه ووکامرس وردپرس
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.26 ▼1.531.67 ▼0.2940.07 ▲1.75
Dashboard /wp-admin2,209 ▲244.87 ▼0.01100.36 ▼13.1039.74 ▲2.15
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0441.57 ▲0.7938.26 ▲2.24
Add New Post /wp-admin/post-new.php1,513 ▼117.62 ▼0.21643.17 ▼58.7558.16 ▲1.86
Media Library /wp-admin/upload.php1,382 ▼04.16 ▼0.0296.81 ▼7.9141.92 ▼2.89

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paystar-card-payment-for-woocommerce/paystar_card.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: paystar, card to card, gateway, card, wordpress...

paystar-card-payment-for-woocommerce/paystar_card.php 92% from 13 tests

"درگاه کارت به کارت پی استار برای افزونه ووکامرس وردپرس" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paystar-card-payment-for-woocommerce.php" instead of "paystar_card.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected278 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2158222
PO File1171756

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity12.50
▷ Minimum class complexity10.00
▷ Maximum class complexity15.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logo.png7.16KB3.43KB▼ 52.05%