58% beyondcart

Code Review | BeyondCart Connector

WordPress plugin BeyondCart Connector scored58%from 54 tests.

About plugin

  • Plugin page: beyondcart
  • Plugin version: 1.5.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: May 12, 2023
  • Latest release: Dec 1, 2023
  • Number of updates: 17
  • Update frequency: every 11.9 days
  • Top authors: beyondcart (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.35MB] [CPU: ▼12.54ms] Passed 4 tests

Analyzing server-side resources used by BeyondCart Connector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0655.38 ▲12.78
Dashboard /wp-admin4.34 ▲0.9953.62 ▼9.46
Posts /wp-admin/edit.php4.39 ▲1.0454.20 ▲6.78
Add New Post /wp-admin/post-new.php4.22 ▼1.6640.36 ▼60.27
Media Library /wp-admin/upload.php4.26 ▲1.0349.93 ▲15.56

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 427 new files
Database: 3 new tables, 7 new options
New tables
wp_grind_mobile_app_carts
wp_grind_mobile_app_terms
wp_grind_mobile_app
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

BeyondCart Connector: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4414.22 ▲0.011.69 ▲0.0740.06 ▼5.29
Dashboard /wp-admin2,208 ▲375.63 ▲0.0294.47 ▼7.1837.98 ▼9.27
Posts /wp-admin/edit.php2,116 ▲161.98 ▼0.0239.27 ▲3.4035.82 ▼1.35
Add New Post /wp-admin/post-new.php45 ▼1,4810.41 ▼22.900.07 ▼635.989.59 ▼40.08
Media Library /wp-admin/upload.php1,413 ▲164.19 ▲0.00113.32 ▲8.3879.04 ▲35.92

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_grind_mobile_app
    • wp_grind_mobile_app_terms
    • wp_grind_mobile_app_carts
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/beyondcart/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/beyondcart/Includes/Tracking.php
    • > /wp-content/plugins/beyondcart/vendor/stripe/stripe-php/build.php
  • 263× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Exception/ApiErrorException.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/beyondcart/Admin/pages/Settings.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Service/BillingPortal/ConfigurationService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Service/ChargeService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Capability.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Service/Terminal/TerminalServiceFactory.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Token.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Service/TransferService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/beyondcart/vendor/stripe/stripe-php/lib/Coupon.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Facebook\\Helpers\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/beyondcart/vendor/facebook/graph-sdk/src/Facebook/Helpers/FacebookJavaScriptHelper.php:31

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Requires at least: The plugin version is formatted incorrectly
You can look at the official readme.txt

beyondcart/grind-mobile-app.php 85% from 13 tests

Analyzing the main PHP file in "BeyondCart Connector" version 1.5.5
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("beyondcart.php" instead of "grind-mobile-app.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/beyondcart/vendor/stripe/stripe-php/data/ca-certificates.crt
22,621 lines of code in 403 files:
LanguageFilesBlank linesComment linesLines of code
PHP3804,63518,40819,560
Markdown578501,502
Sass1918484
CSS2118387
JSON500334
PO File16672168
JavaScript31116108
XML20038
make110029
Ruby16127
YAML1003
HTML1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity5.59
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces50
Interfaces14
Traits9
Classes339
▷ Abstract classes123.54%
▷ Concrete classes32796.46%
▷ Final classes00.00%
Methods1,602
▷ Static methods29818.60%
▷ Public methods1,45590.82%
▷ Protected methods644.00%
▷ Private methods835.18%
Functions58
▷ Named functions1220.69%
▷ Anonymous functions4679.31%
Constants862
▷ Global constants121.39%
▷ Class constants85098.61%
▷ Public constants850100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin