79% striper

Code Review | Striper - Stripe Integration for WooCommerce

WordPress plugin Striper - Stripe Integration for WooCommerce scored 79% from 54 tests.

About plugin

  • Plugin page: striper
  • Plugin version: 0.93
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.6
  • WordPress version: 5.8.1
  • First release: Oct 5, 2013
  • Latest release: Jun 24, 2015
  • Number of updates: 82
  • Update frequency: every 7.9 days
  • Top authors: seanvoss (98.78%)giuliom (2.44%)

Code review

54 tests

User reviews

20 reviews

Install metrics

300+ active / 22,281 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼175.25ms] Passed 4 tests

A check of server-side resources used by Striper - Stripe Integration for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0031.42 ▼5.85
Dashboard /wp-admin3.06 ▲0.0153.66 ▼1.69
Posts /wp-admin/edit.php3.11 ▲0.0149.30 ▲3.70
Add New Post /wp-admin/post-new.php5.42 ▼0.0191.58 ▼694.87
Media Library /wp-admin/upload.php3.00 ▲0.0034.75 ▲1.41

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 66 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Striper - Stripe Integration for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.93 ▲0.4510.23 ▲0.2749.31 ▼9.28
Dashboard /wp-admin2,989 ▲555.91 ▼0.04148.01 ▲0.56117.61 ▲1.78
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0169.08 ▼5.9995.20 ▲1.11
Add New Post /wp-admin/post-new.php1,683 ▲6818.75 ▼2.48386.98 ▲104.81113.14 ▼6.72
Media Library /wp-admin/upload.php1,807 ▼05.03 ▼0.01148.17 ▼10.83137.17 ▲7.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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)
Good news, no errors were detected

SRP 0% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/striper/lib/stripe-php/test/Stripe.php
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/striper/lib/stripe-php/test/Stripe/BalanceTransactionTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'StripeTestCase' not found in wp-content/plugins/striper/lib/stripe-php/test/Stripe/BalanceTest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/Charge.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/BalanceTransaction.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/CardError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/Card.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/SingletonApiResource.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/Event.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_SingletonApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/Balance.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/striper/lib/stripe-php/lib/Stripe/Plan.php:3

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 Passed 29 tests

readme.txt Passed 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
4 plugin tags: payments, stripe, free stripe integration, woocommerce

striper/striper.php Passed 13 tests

The main PHP script in "Striper - Stripe Integration for WooCommerce" version 0.93 is automatically included on every request by WordPress
72 characters long description:
Provides a Credit Card Payment Gateway through Stripe for woo-commerece.

Code Analysis 5% from 3 tests

File types 0% from 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
It is important to fix the following items
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/striper/lib/stripe-php/lib/data/ca-certificates.crt
2,171 lines of code in 58 files:
LanguageFilesBlank linesComment linesLines of code
PHP543311002,095
JSON10029
JavaScript19824
Markdown19014
YAML1309

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.41
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes510.20%
▷ Concrete classes4489.80%
▷ Final classes00.00%
Methods194
▷ Static methods7840.21%
▷ Public methods17389.18%
▷ Protected methods168.25%
▷ Private methods52.58%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/credits.png6.19KB3.36KB▼ 45.68%