61% wc-cashapp

Code Review | Checkout with Cash App on WooCommerce

WordPress plugin Checkout with Cash App on WooCommerce scored61%from 54 tests.

About plugin

  • Plugin page: wc-cashapp
  • Plugin version: 5.3.1
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Sep 30, 2023
  • Number of updates: 67
  • Update frequency: every 17.0 days
  • Top authors: theafricanboss (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

2,000+ active /41,118 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.55MB] [CPU: ▲0.56ms] 75% from 4 tests

Server-side resources used by Checkout with Cash App on WooCommerce
It is recommended to improve the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,889.75ms on /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cashapp)
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5736.45 ▼12.47
Dashboard /wp-admin3.92 ▲0.6254.39 ▲5.17
Posts /wp-admin/edit.php3.97 ▲0.6252.45 ▲6.28
Add New Post /wp-admin/post-new.php6.44 ▲0.55104.96 ▲11.72
Media Library /wp-admin/upload.php3.68 ▲0.4637.88 ▲3.27
Automated Order Updates /wp-admin/admin.php?page=wc_cashapp_automated_status3.7135.16
Cash App Link /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cashapp3.931,889.75
Cash App Link vs Cash App Pay /wp-admin/admin.php?page=wc_cashapp_compared3.6936.35
Square Tokens /wp-admin/admin.php?page=wc_cashapp_square3.6934.31
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius4.0538.89
Recommended Plugins /wp-admin/admin.php?page=wc_cashapp_recommended3.6835.90
Cash App Pay /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cash-app-pay3.5235.67
Support /wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Cashapp%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A3.5226.57
Help /wp-admin/admin.php?page=wc_cashapp_help3.6935.15

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 241 new files
Database: no new tables, 10 new options
New WordPress options
fs_accounts
recovery_mode_email_last_sent
fs_active_plugins
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
fs_debug_mode
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Checkout with Cash App on WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲19813.24 ▼1.014.70 ▲2.7431.38 ▼8.17
Dashboard /wp-admin2,339 ▲1484.84 ▼0.05109.69 ▲7.4346.09 ▲5.81
Posts /wp-admin/edit.php2,225 ▲1362.02 ▲0.0140.09 ▲3.2541.70 ▲4.47
Add New Post /wp-admin/post-new.php1,615 ▲8223.29 ▼0.07627.15 ▲48.9856.53 ▲3.06
Media Library /wp-admin/upload.php1,518 ▲1304.18 ▼0.0196.06 ▼2.3547.89 ▲3.96
Automated Order Updates /wp-admin/admin.php?page=wc_cashapp_automated_status8051.146.6149.91
Cash App Link /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cashapp1,1031.6926.1255.36
Cash App Link vs Cash App Pay /wp-admin/admin.php?page=wc_cashapp_compared1,1262.0224.6081.67
Square Tokens /wp-admin/admin.php?page=wc_cashapp_square8061.146.0629.94
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1711.7326.9627.65
Recommended Plugins /wp-admin/admin.php?page=wc_cashapp_recommended1,0122.0323.8242.92
Cash App Pay /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cash-app-pay280.440.103.43
Support /wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Cashapp%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A280.440.093.61
Help /wp-admin/admin.php?page=wc_cashapp_help2,71823.12744.9467.14

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
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/wc-cashapp/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • fs_active_plugins
    • widget_recent-posts
    • fs_debug_mode
    • widget_recent-comments
    • fs_accounts
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=wc_cashapp_automated_status
    • > Error in wp-content/plugins/wc-cashapp/includes/admin/email-receipts.php+8
    Uncaught Error: Class 'WC_Cashapp_Gateway' not found in wp-content/plugins/wc-cashapp/includes/admin/email-receipts.php:8
    Stack trace:
    #0 wp-content/plugins/wc-cashapp/includes/admin/dashboard.php(129): require_once()
    #1 wp-includes/class-wp-hook.php(310): wc_cashapp_email_receipts_menu_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=wc_cashapp_square
    • > Error in wp-content/plugins/wc-cashapp/includes/admin/square.php+6
    Uncaught Error: Class 'WC_Cash_App_Pay_Gateway' not found in wp-content/plugins/wc-cashapp/includes/admin/square.php:6
    Stack trace:
    #0 wp-content/plugins/wc-cashapp/includes/admin/dashboard.php(281): require_once()
    #1 wp-includes/class-wp-hook.php(310): wc_cashapp_square_menu_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/wc-cashapp/languages/index.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=cash-app-pay
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=checkout&section=cash-app-pay - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Cashapp%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A
    • > Network (severe)
    wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Cashapp%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (18 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wc-cashapp/cashapp.php 77% from 13 tests

The primary PHP file in "Checkout with Cash App on WooCommerce" version 5.3.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wc-cashapp.php" instead of "cashapp.php")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin36,473 lines of code in 167 files:
LanguageFilesBlank linesComment linesLines of code
PHP1438,32118,09435,759
JavaScript856143554
CSS16306160

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity90.65
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.65
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,307
▷ Static methods19715.07%
▷ Public methods90669.32%
▷ Protected methods292.22%
▷ Private methods37228.46%
Functions117
▷ Named functions11094.02%
▷ Anonymous functions75.98%
Constants153
▷ Global constants10669.28%
▷ Class constants4730.72%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.31MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/cashapp_35.png1.15KB1.02KB▼ 11.12%
assets/images/venmo_icon_1200.png60.88KB28.90KB▼ 52.53%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
assets/images/zelle_icon_1200.png62.93KB26.88KB▼ 57.30%
assets/images/venmo-256x256.png11.55KB5.61KB▼ 51.38%