58% get-stripe-customer-portal-lite

Code Review | Get Stripe Customer Portal Light

WordPress plugin Get Stripe Customer Portal Light scored 58% from 54 tests.

About plugin

  • Plugin page: get-stripe-custom...
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: May 12, 2021
  • Latest release: Aug 16, 2023
  • Number of updates: 12
  • Update frequency: every 68.8 days
  • Top authors: egene (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active / 1,431 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.88MB] [CPU: ▼1.43ms] Passed 4 tests

This is a short check of server-side resources used by Get Stripe Customer Portal Light
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9239.00 ▼8.84
Dashboard /wp-admin4.22 ▲0.9149.82 ▲2.44
Posts /wp-admin/edit.php4.27 ▲0.9147.28 ▲1.33
Add New Post /wp-admin/post-new.php6.73 ▲0.8596.33 ▼0.66
Media Library /wp-admin/upload.php4.08 ▲0.8537.89 ▲2.44
Stripe Portal Settings /wp-admin/options-general.php?page=gscp_lite_main_settings4.0434.89

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 239 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Get Stripe Customer Portal Light
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9913.57 ▼1.022.29 ▲0.4344.99 ▲2.98
Dashboard /wp-admin2,212 ▲244.84 ▼0.06114.16 ▲13.0842.84 ▼0.86
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0439.44 ▲1.1734.69 ▲2.17
Add New Post /wp-admin/post-new.php1,542 ▼023.19 ▲4.84628.40 ▲21.1751.33 ▼1.12
Media Library /wp-admin/upload.php1,394 ▲34.22 ▲0.01104.92 ▲4.3543.67 ▲0.30
Stripe Portal Settings /wp-admin/options-general.php?page=gscp_lite_main_settings9382.0522.8030.94

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 did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'plugin_uninstall' not found or invalid function name
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/build.php
    • > /wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/update_certs.php
  • 188× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Service/Sigma/ScheduledQueryRunService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Service/Issuing/CardService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/CreditNoteLineItem.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Person.php:40
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Exception/OAuth/InvalidRequestException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/SetupAttempt.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Service/Terminal/ConnectionTokenService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Reporting/ReportType.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Plan.php:48
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/get-stripe-customer-portal-lite/modules/stripe_library/lib/Service/Checkout/SessionService.php:7

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
2 plugin tags: stripe portal, stripe

get-stripe-customer-portal-lite/get-stripe-customer-portal-lite.php 92% from 13 tests

The main PHP file in "Get Stripe Customer Portal Light" ver. 1.1.4 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "4.7")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
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/get-stripe-customer-portal-lite/modules/stripe_library/data/ca-certificates.crt
8,744 lines of code in 229 files:
LanguageFilesBlank linesComment linesLines of code
PHP2181,8648,8167,514
Markdown36520986
CSS216092
JSON10048
JavaScript21243
XML10031
make19027
YAML1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.13
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity42.00
Code structure
Namespaces21
Interfaces6
Traits7
Classes201
▷ Abstract classes104.98%
▷ Concrete classes19195.02%
▷ Final classes00.00%
Methods681
▷ Static methods15522.76%
▷ Public methods61690.46%
▷ Protected methods284.11%
▷ Private methods375.43%
Functions13
▷ Named functions538.46%
▷ Anonymous functions861.54%
Constants701
▷ Global constants20.29%
▷ Class constants69999.71%
▷ Public constants699100.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 were not PNG files found in your plugin