68% wp-stripe-kit-lite

Code Review | WP Stripe Kit Lite

WordPress plugin WP Stripe Kit Lite scored68%from 54 tests.

About plugin

  • Plugin page: wp-stripe-kit-lite
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-5.1.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2016
  • Latest release: Apr 6, 2019
  • Number of updates: 26
  • Update frequency: every 37.2 days
  • Top authors: lhosford (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,071 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.03MB] [CPU: ▼0.89ms] Passed 4 tests

A check of server-side resources used by WP Stripe Kit Lite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.32 ▲3.69
Dashboard /wp-admin3.33 ▲0.0353.26 ▲6.69
Posts /wp-admin/edit.php3.39 ▲0.0353.49 ▲2.19
Add New Post /wp-admin/post-new.php5.93 ▲0.0588.42 ▼12.91
Media Library /wp-admin/upload.php3.26 ▲0.0337.71 ▲3.48

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 197 new files
Database: no new tables, 9 new options
New WordPress options
alh_wp_stripe_kit_lite_checkout_button_css_normal
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
alh_wp_stripe_kit_lite_checkout_button_css_hover
db_upgraded
widget_recent-comments
alh_wp_stripe_kit_lite_checkout_button_css_active

Browser metrics Passed 4 tests

WP Stripe Kit Lite: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲11213.40 ▼0.958.94 ▲6.8940.95 ▼4.42
Dashboard /wp-admin2,215 ▲355.47 ▼0.2083.28 ▼12.9338.76 ▼4.74
Posts /wp-admin/edit.php2,123 ▲232.02 ▼0.0139.00 ▲2.1034.91 ▼0.36
Add New Post /wp-admin/post-new.php1,546 ▲1923.48 ▲0.68662.12 ▼14.8854.19 ▼4.67
Media Library /wp-admin/upload.php1,423 ▲264.23 ▲0.0395.67 ▼5.5745.75 ▼1.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 11× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/wp-stripe-kit-lite/public/partials/wp-stripe-kit-checkout-button-ui.php
    • > /wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/bootstrap.no_autoload.php
    • > /wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/update_certs.php
    • > /wp-content/plugins/wp-stripe-kit-lite/public/partials/wp-stripe-kit-subscription-button-ui.php
    • > /wp-content/plugins/wp-stripe-kit-lite/public/partials/wp-stripe-kit-checkout-common-ui.php
    • > /wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/build.php
    • > /wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/bootstrap.php
    • > /wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/examples/oauth.php
    • > /wp-content/plugins/wp-stripe-kit-lite/includes/wp-stripe-kit-admin-checkout-button-style-a-normal.php
    • > /wp-content/plugins/wp-stripe-kit-lite/includes/wp-stripe-kit-admin-checkout-button-style-a-active.php
  • 137× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/Stripe/TransferTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/Stripe/ApplePayDomainTest.php:5
    • > PHP Notice
      Undefined variable: stripe_pk in wp-content/plugins/wp-stripe-kit-lite/public/partials/wp-stripe-kit-checkout-common-ui.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Util\\LoggerInterface' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/lib/Util/DefaultLogger.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/lib/FileUpload.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/TestCase.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/Stripe/OrderTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/lib/Error/Api.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/lib/BitcoinTransaction.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/tests/Stripe/RecipientTest.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: ecommerce, stripe, e-commerce, stripe checkout, subscription...

wp-stripe-kit-lite/wp-stripe-kit-lite.php 92% from 13 tests

The entry point to "WP Stripe Kit Lite" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Almost there! Just fix the following issues
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wp-stripe-kit-lite/vendors/stripe-php-6.7.4/data/ca-certificates.crt
9,436 lines of code in 180 files:
LanguageFilesBlank linesComment linesLines of code
PHP1681,2813,2278,510
Markdown32200501
CSS2232170
JavaScript220153
JSON10036
YAML27136
XML20030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity3.50
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces7
Interfaces2
Traits7
Classes140
▷ Abstract classes75.00%
▷ Concrete classes13395.00%
▷ Final classes00.00%
Methods657
▷ Static methods13320.24%
▷ Public methods60892.54%
▷ Protected methods172.59%
▷ Private methods324.87%
Functions8
▷ Named functions225.00%
▷ Anonymous functions675.00%
Constants231
▷ Global constants41.73%
▷ Class constants22798.27%
▷ Public constants227100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
vendors/stripe-php-6.7.4/tests/data/test.png0.09KB0.09KB0.00%