10% gg-multiple-payment-routing

Code Review | GG Multiple Payment Routing for WooCommerce - Split and manage PayPal, Stripe accounts

WordPress plugin GG Multiple Payment Routing for WooCommerce - Split and manage PayPal, Stripe accounts scored10%from 54 tests.

About plugin

  • Plugin page: gg-multiple-payme...
  • Plugin version: 1.0.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.4.2
  • WordPress version: 6.3.1
  • First release: Jul 22, 2020
  • Latest release: Aug 29, 2020
  • Number of updates: 16
  • Update frequency: every 2.4 days
  • Top authors: gutengeek (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /924 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/gg-multiple-payment-routing/inc/Common/Module/Stripe/Stripe_Hook.php+64
    Undefined index: enabled

Server metrics [RAM: ▼1.58MB] [CPU: ▼48.57ms] Passed 4 tests

Server-side resources used by GG Multiple Payment Routing for WooCommerce - Split and manage PayPal, Stripe accounts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.32 ▼1.187.97 ▼34.39
Dashboard /wp-admin2.51 ▼0.8312.52 ▼37.23
Posts /wp-admin/edit.php2.51 ▼0.8911.86 ▼35.47
Add New Post /wp-admin/post-new.php2.51 ▼3.4214.14 ▼87.18
Media Library /wp-admin/upload.php2.51 ▼0.7610.52 ▼25.05
PayPal Accounts /wp-admin/edit.php?post_type=ggmp_paypal2.5111.97
Settings /wp-admin/admin.php?page=ggmp2.5112.81
Stripe Accounts /wp-admin/edit.php?post_type=ggmp_stripe2.5112.58

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 158 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by GG Multiple Payment Routing for WooCommerce - Split and manage PayPal, Stripe accounts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.74 ▲0.591.55 ▼0.1242.54 ▼0.84
Dashboard /wp-admin2,234 ▲605.85 ▲0.2595.02 ▲5.3542.16 ▼1.94
Posts /wp-admin/edit.php2,136 ▲362.43 ▲0.4035.41 ▼2.6734.42 ▼1.31
Add New Post /wp-admin/post-new.php1,557 ▲3123.71 ▲0.45689.14 ▲8.2265.48 ▲7.91
Media Library /wp-admin/upload.php1,436 ▲364.57 ▲0.38106.44 ▲6.7045.95 ▼2.65
PayPal Accounts /wp-admin/edit.php?post_type=ggmp_paypal1,1352.4334.0529.42
Settings /wp-admin/admin.php?page=ggmp8791.9026.2128.82
Stripe Accounts /wp-admin/edit.php?post_type=ggmp_stripe1,1352.3731.3328.83

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/gg-multiple-payment-routing/inc/Common/Module/Stripe/Stripe_Hook.php+64
    Undefined index: enabled
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

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
These server-side errors were triggered
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=ggmp_stripe
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/gg-multiple-payment-routing/inc/Common/Module/Stripe/Stripe_Hook.php+64
    Undefined index: enabled

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
The following issues need your attention
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/Field/views/input-textarea.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/Field/views/input-title.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/Field/views/input-multi-checkbox.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/View/tabs.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gg-multiple-payment-routing/inc/Core/ajax-functions.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_parse_args() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/Field/views/input-switch.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'GGMP\\Core\\Metabox' not found in wp-content/plugins/gg-multiple-payment-routing/inc/Admin/Metabox/Stripe_Account_Metabox.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/Field/views/input-radio.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GGMP\\Core\\Metabox' not found in wp-content/plugins/gg-multiple-payment-routing/inc/Admin/Metabox/Paypal_Account_Metabox.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/gg-multiple-payment-routing/inc/Libraries/Form/Field/views/input-select.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% 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
Please fix the following attributes: The official readme.txt might help

gg-multiple-payment-routing/gg-multiple-payment-routing.php 77% from 13 tests

The main PHP file in "GG Multiple Payment Routing for WooCommerce - Split and manage PayPal, Stripe accounts" ver. 1.0.8 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("5.2" instead of "3.6")

Code Analysis Passed 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
No dangerous file extensions were detected19,106 lines of code in 145 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript692,66387410,274
PHP671,5892,4577,569
CSS73021201,243
SVG10019
JSON1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity20.66
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.52
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces16
Interfaces1
Traits1
Classes42
▷ Abstract classes24.76%
▷ Concrete classes4095.24%
▷ Final classes00.00%
Methods347
▷ Static methods3810.95%
▷ Public methods30888.76%
▷ Protected methods72.02%
▷ Private methods329.22%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants13
▷ Global constants753.85%
▷ Class constants646.15%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin