10% paystar-payment-for-cf7

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

WordPress plugin درگاه پرداخت پی استار برای فرم های Contact 7 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: Dec 15, 2021
  • Latest release: Apr 15, 2022
  • Number of updates: 3
  • Update frequency: every 40.3 days
  • Top authors: mrfazeli666paystar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /242 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

Server metrics [RAM: ▲0.08MB] [CPU: ▼3.29ms] Passed 4 tests

Server-side resources used by درگاه پرداخت پی استار برای فرم های Contact 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0938.56 ▼3.45
Dashboard /wp-admin3.39 ▲0.0848.50 ▼5.72
Posts /wp-admin/edit.php3.44 ▲0.0845.09 ▼0.47
Add New Post /wp-admin/post-new.php5.97 ▲0.0890.16 ▲4.35
Media Library /wp-admin/upload.php3.31 ▲0.0833.23 ▼3.53

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: 1 new table, 8 new options
New tables
wp_paystar_contact_form_7
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
cf7pp_options
can_compress_scripts
cf7pp_my_plugin_notice_shown
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by درگاه پرداخت پی استار برای فرم های Contact 7
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.24 ▼1.144.50 ▲2.6740.69 ▼2.83
Dashboard /wp-admin2,211 ▲265.75 ▼0.10103.94 ▼21.5046.34 ▼7.42
Posts /wp-admin/edit.php2,096 ▲71.98 ▼0.0435.50 ▼0.2740.63 ▲3.84
Add New Post /wp-admin/post-new.php1,468 ▼5117.37 ▼5.87630.99 ▼49.3868.04 ▲9.30
Media Library /wp-admin/upload.php1,396 ▲114.19 ▼0.0794.02 ▼10.2449.66 ▲4.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_paystar_contact_form_7
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/paystar-payment-for-cf7/gateway_func.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WPCF7_ContactForm' not found in wp-content/plugins/paystar-payment-for-cf7/redirect.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

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: contact forms, form makers, paystar, payment, wordpress...

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

"درگاه پرداخت پی استار برای فرم های Contact 7" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paystar-payment-for-cf7.php" instead of "gateway_func.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected647 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP35012578
PO File1252569

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions1275.00%
▷ Anonymous functions425.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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%