68% woocommerce-mesasix-stripe-payment-extension

Code Review | WooCommerce Mesasix Stripe Payment Extension

WordPress plugin WooCommerce Mesasix Stripe Payment Extension scored68%from 54 tests.

About plugin

  • Plugin page: woocommerce-mesas...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.9
  • WordPress version: 6.3.1
  • First release: May 20, 2014
  • Latest release: May 20, 2014
  • Number of updates: 5
  • Update frequency: every 1.0 days
  • Top authors: jervenmatthew (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,157 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼7.54ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Mesasix Stripe Payment Extension
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.80 ▲0.3442.29 ▲2.43
Dashboard /wp-admin3.65 ▲0.3048.53 ▼11.17
Posts /wp-admin/edit.php3.70 ▲0.3449.25 ▼5.22
Add New Post /wp-admin/post-new.php6.23 ▲0.3488.27 ▼11.30
Media Library /wp-admin/upload.php3.57 ▲0.3437.24 ▼2.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WooCommerce Mesasix Stripe Payment Extension
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.67 ▼0.761.73 ▲0.1243.61 ▼1.23
Dashboard /wp-admin2,206 ▲155.90 ▲1.02102.29 ▼5.7439.02 ▼1.45
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0035.02 ▼0.5534.34 ▲2.16
Add New Post /wp-admin/post-new.php1,528 ▲918.49 ▼4.66631.31 ▼37.5954.79 ▼5.16
Media Library /wp-admin/upload.php1,391 ▼04.19 ▼0.01100.39 ▼2.0946.72 ▲4.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/test/Stripe.php
    • > /wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/public/views/public.php
  • 44× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/ApiConnectionError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/Coupon.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/Plan.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/InvalidRequestError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'UnitTestCase' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/test/Stripe/InvalidRequestErrorTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/AuthenticationError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/Transfer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/test/Stripe/AccountTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Util_Set' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/Object.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/Stripe/Event.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: woo, mesasix, credit card payment, woocommerce, stripe

woocommerce-mesasix-stripe-payment-extension/mesasix_stripe.php 85% from 13 tests

"WooCommerce Mesasix Stripe Payment Extension" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-mesasix-stripe-payment-extension.php" instead of "mesasix_stripe.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please fix the following items
  • 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/woocommerce-mesasix-stripe-payment-extension/includes/lib/stripe-php/lib/data/ca-certificates.crt
2,490 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
PHP574795322,245
CSS302164
JavaScript3281143
JSON10029
YAML1309

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.06
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity1.73
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes59.80%
▷ Concrete classes4690.20%
▷ Final classes00.00%
Methods213
▷ Static methods8539.91%
▷ Public methods19089.20%
▷ Protected methods136.10%
▷ Private methods104.69%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.PNG80.05KB28.63KB▼ 64.24%
assets/screenshot-1.png80.05KB28.63KB▼ 64.24%
assets/img/cards.png4.24KB3.20KB▼ 24.48%
assets/img/stripe.png2.35KB1.54KB▼ 34.58%