60% momo-venmo

Code Review | Checkout with Venmo on Woocommerce

WordPress plugin Checkout with Venmo on Woocommerce scored60%from 54 tests.

About plugin

  • Plugin page: momo-venmo
  • Plugin version: 4.2
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 28, 2021
  • Latest release: Aug 24, 2023
  • Number of updates: 39
  • Update frequency: every 21.0 days
  • Top authors: theafricanboss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /22,522 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲4.94MB] [CPU: ▲14.93ms] 75% from 4 tests

Server-side resources used by Checkout with Venmo on Woocommerce
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,761.42ms on /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=venmo)
PageMemory (MB)CPU Time (ms)
Home /8.83 ▲5.3760.49 ▲20.30
Dashboard /wp-admin8.85 ▲5.5067.75 ▲7.42
Posts /wp-admin/edit.php8.85 ▲5.4978.23 ▲28.80
Add New Post /wp-admin/post-new.php9.29 ▲3.41110.77 ▲3.20
Media Library /wp-admin/upload.php8.85 ▲5.6265.68 ▲31.64
Help /wp-admin/admin.php?page=wc_venmo_help_menu_page8.8557.06
Automated Order Updates /wp-admin/admin.php?page=wc_venmo_automated_status8.8565.94
Recommended /wp-admin/admin.php?page=wc_venmo_recommended_menu_page8.8555.54
Venmo Link vs Pay with Venmo /wp-admin/admin.php?page=wc_venmo_compared8.8556.84
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8555.44
Venmo Link /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=venmo8.851,761.42
Venmo Pay /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=venmo-pay8.8557.41
Help /wp-admin/admin.php?page=wc_venmo_help8.8556.08
Support /wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Venmo%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A8.8559.09

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 239 new files
Database: no new tables, 10 new options
New WordPress options
fs_debug_mode
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
fs_accounts
fs_active_plugins
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

Checking browser requirements for Checkout with Venmo on Woocommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18313.25 ▼1.341.73 ▲0.1427.58 ▼13.34
Dashboard /wp-admin2,335 ▲1474.89 ▼0.02111.34 ▼5.7144.95 ▼1.06
Posts /wp-admin/edit.php2,218 ▲1292.13 ▲0.1239.42 ▼1.9237.51 ▲0.39
Add New Post /wp-admin/post-new.php1,610 ▲7717.51 ▼5.88660.83 ▲5.6259.49 ▼4.38
Media Library /wp-admin/upload.php1,517 ▲1324.27 ▲0.04114.01 ▲11.3647.32 ▲2.38
Help /wp-admin/admin.php?page=wc_venmo_help_menu_page2,09622.87521.1794.67
Automated Order Updates /wp-admin/admin.php?page=wc_venmo_automated_status8011.148.4835.40
Recommended /wp-admin/admin.php?page=wc_venmo_recommended_menu_page1,0022.0624.7643.85
Venmo Link vs Pay with Venmo /wp-admin/admin.php?page=wc_venmo_compared1,2102.0325.8073.44
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,1811.8422.9826.03
Venmo Link /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=venmo1,0921.8627.6554.45
Venmo Pay /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=venmo-pay280.440.103.35
Help /wp-admin/admin.php?page=wc_venmo_help2,04616.36449.4648.69
Support /wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Venmo%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A280.440.085.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/momo-venmo/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 10 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • fs_active_plugins
    • db_upgraded
    • fs_accounts
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wc_venmo_automated_status
    • > Error in wp-content/plugins/momo-venmo/includes/admin/email-receipts.php+8
    Uncaught Error: Class 'WC_Venmo_Gateway' not found in wp-content/plugins/momo-venmo/includes/admin/email-receipts.php:8
    Stack trace:
    #0 wp-content/plugins/momo-venmo/includes/admin/dashboard.php(217): require_once()
    #1 wp-includes/class-wp-hook.php(310): wc_venmo_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

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/momo-venmo/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
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=wc-settings&tab=checkout§ion=venmo-pay
    • > Network (severe)
    wp-admin/admin.php?page=wc-settings&tab=checkout&section=venmo-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%20Venmo%20Plugin%20Support&body=Hello%2C%0D%0A%0D%0A
    • > Network (severe)
    wp-admin/admin.php?page=mailto:info@theafricanboss.com?subject=WC%20Venmo%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 83% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #5 (Thank you page after placing the order via the Venmo Link payment method), #6 (This is where the Venmo link brings the customer with a prefilled order amount, id, and note)
You can take inspiration from this readme.txt

momo-venmo/venmo.php 77% from 13 tests

Analyzing the main PHP file in "Checkout with Venmo on Woocommerce" version 4.2
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("momo-venmo.php" instead of "venmo.php")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin35,732 lines of code in 164 files:
LanguageFilesBlank linesComment linesLines of code
PHP1388,21417,60634,997
JavaScript972243578
CSS16296156
SVG1001

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity88.88
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes52
▷ Abstract classes23.85%
▷ Concrete classes5096.15%
▷ Final classes00.00%
Methods1,291
▷ Static methods19715.26%
▷ Public methods90069.71%
▷ Protected methods191.47%
▷ Private methods37228.81%
Functions113
▷ Named functions10895.58%
▷ Anonymous functions54.42%
Constants153
▷ Global constants10669.28%
▷ Class constants4730.72%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 1.32MB with 0.67MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/zelle-256x256.png9.01KB5.04KB▼ 44.06%
assets/images/cashapp-256x256.png12.59KB5.87KB▼ 53.36%
freemius/assets/img/momo-venmo.png11.55KB5.61KB▼ 51.38%
assets/images/icon-256x256.png11.55KB5.61KB▼ 51.38%
assets/images/venmo-256x256.png11.55KB5.61KB▼ 51.38%