77% paypal-payment-button-by-vcita

Code Review | Online Payments - Get Paid with PayPal, Square & Stripe

WordPress plugin Online Payments - Get Paid with PayPal, Square & Stripe scored77%from 54 tests.

About plugin

  • Plugin page: paypal-payment-bu...
  • Plugin version: 3.10.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2014
  • Latest release: Sep 12, 2023
  • Number of updates: 82
  • Update frequency: every 39.0 days
  • Top authors: vCita (97.56%)ehud.vcita (3.66%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /48,768 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.22MB] [CPU: ▼3.19ms] Passed 4 tests

A check of server-side resources used by Online Payments - Get Paid with PayPal, Square & Stripe
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2041.77 ▼2.63
Dashboard /wp-admin3.57 ▲0.2749.36 ▼4.50
Posts /wp-admin/edit.php3.62 ▲0.2650.92 ▲0.51
Add New Post /wp-admin/post-new.php6.11 ▲0.2289.40 ▼6.15
Media Library /wp-admin/upload.php3.43 ▲0.2038.66 ▲1.67
/wp-admin/admin.php?page=live-site-parse-vcita-callback3.3833.48
/wp-admin/admin.php?page=live-site-reset-plugin3.5548.42

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
livesite_plugin_settings
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Online Payments - Get Paid with PayPal, Square & Stripe: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲1614.19 ▲0.011.72 ▼0.6442.26 ▼5.55
Dashboard /wp-admin2,191 ▲175.56 ▲0.0184.48 ▼11.0779.46 ▲38.74
Posts /wp-admin/edit.php2,114 ▲111.97 ▲0.0132.87 ▼1.9532.75 ▼3.96
Add New Post /wp-admin/post-new.php1,550 ▲2220.87 ▼2.27663.80 ▼21.9149.24 ▼2.23
Media Library /wp-admin/upload.php1,405 ▲54.17 ▼0.0195.99 ▼9.4468.25 ▲23.16
/wp-admin/admin.php?page=live-site-parse-vcita-callback2,0483.2143.5091.24
/wp-admin/admin.php?page=live-site-reset-plugin1,7022.3730.0798.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+57
    Undefined index: success
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+58
    Undefined index: uid
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+59
    Undefined index: first_name
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+60
    Undefined index: last_name
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+61
    Undefined index: title
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+62
    Undefined index: confirmation_token
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+63
    Undefined index: confirmed
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+64
    Undefined index: engage_delay
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+65
    Undefined index: implementation_key
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php+66
    Undefined index: email
    • > GET request to /wp-admin/admin.php?page=live-site-parse-vcita-callback
    • > Notice in wp-content/plugins/paypal-payment-button-by-vcita/plugin_init.php+118
    Undefined index: plugin_initially_activated

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/paypal-payment-button-by-vcita/Livesite.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/paypal-payment-button-by-vcita/core/ajax_api.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'ls_helpers' not found in wp-content/plugins/paypal-payment-button-by-vcita/system/settings_page.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'ls_helpers' not found in wp-content/plugins/paypal-payment-button-by-vcita/system/backoffice_page.php:42
    • > PHP Fatal error
      Uncaught Error: Class 'ls_helpers' not found in wp-content/plugins/paypal-payment-button-by-vcita/system/parse_vcita_callback.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'ls_helpers' not found in wp-content/plugins/paypal-payment-button-by-vcita/system/reset_plugin.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ls_get_module_data() in wp-content/plugins/paypal-payment-button-by-vcita/modules/scheduler.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ls_get_module_data() in wp-content/plugins/paypal-payment-button-by-vcita/modules/form_builder.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'ls_helpers' not found in wp-content/plugins/paypal-payment-button-by-vcita/core/sdk.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ls_get_module_data() in wp-content/plugins/paypal-payment-button-by-vcita/modules/livesite_widget.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (**Customize and add your PayPal Payment Button**), #2 (**Friendly payment experience for your clients** - Mobile ready payment process that would look great on any device), #3 (**Mobile Friendly payment experience for your clients**), #4 (**Issue invoices** - Create and send invoices to clients, track payment status in real time and send reminders for late payments), #5 (**A client portal for each client** - Clients can view their payment history, pay for pending invoices, and even book new appointments or services)
Please take inspiration from this readme.txt

paypal-payment-button-by-vcita/Livesite.php 69% from 13 tests

The principal PHP file in "Online Payments - Get Paid with PayPal, Square & Stripe" v. 3.10.0 is loaded by WordPress automatically on each request
The following require your attention:
  • Domain Path: Please prefix the domain path with a forward slash character ("/")
  • Description: Keep the plugin description shorter than 140 characters (currently 153 characters long)
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("paypal-payment-button-by-vcita.php" instead of "Livesite.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 detected3,341 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP201,0561,0792,285
CSS49823777
JavaScript69738188
JSON10072
SVG10019

PHP code Passed 2 tests

This is a short overview 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.17
Average class complexity8.21
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods123
▷ Static methods00.00%
▷ Public methods123100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
10 PNG files occupy 0.32MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png17.73KB8.28KB▼ 53.32%
screenshot-3.png78.33KB37.42KB▼ 52.23%
images/ls-payment-icons.png4.15KB2.38KB▼ 42.57%
images/header-main.png43.71KB16.87KB▼ 61.40%
images/vcita-icon.png0.50KB0.46KB▼ 7.95%