74% simple-stripe-button

Code Review | Simple Stripe checkout buttons

WordPress plugin Simple Stripe checkout buttons scored74%from 54 tests.

About plugin

  • Plugin page: simple-stripe-button
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.6
  • WordPress version: 6.3.1
  • First release: Dec 24, 2020
  • Latest release: Dec 24, 2020
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: ognjenpetrovic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /330 total downloads

Benchmarks

Plugin footprint 83% from 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.06MB] [CPU: ▼1.31ms] Passed 4 tests

Analyzing server-side resources used by Simple Stripe checkout buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0534.03 ▼5.12
Dashboard /wp-admin3.37 ▲0.0645.41 ▲2.26
Posts /wp-admin/edit.php3.42 ▲0.0648.31 ▼4.43
Add New Post /wp-admin/post-new.php5.95 ▲0.0694.50 ▲6.22
Media Library /wp-admin/upload.php3.29 ▲0.0635.07 ▲2.04
Simple Stripe button /wp-admin/options-general.php?page=sposnage-stripe-plugin3.2631.28

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 218 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Simple Stripe checkout buttons: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.081.68 ▼0.3741.97 ▼1.00
Dashboard /wp-admin2,204 ▲165.87 ▲0.76103.73 ▼15.2341.48 ▼3.23
Posts /wp-admin/edit.php2,093 ▲12.01 ▲0.0240.42 ▼1.7234.82 ▼0.81
Add New Post /wp-admin/post-new.php1,517 ▲317.54 ▲0.01597.04 ▼46.7450.41 ▼2.46
Media Library /wp-admin/upload.php1,392 ▲104.26 ▲0.1194.80 ▼6.7741.95 ▼2.99
Simple Stripe button /wp-admin/options-general.php?page=sposnage-stripe-plugin8592.0624.2529.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
The following issues need your attention
  • 185× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/SubscriptionSchedule.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Service/OAuthService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Service/DisputeService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Review.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Service/Issuing/CardService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Exception/OAuth/InvalidRequestException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Mandate.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Exception/BadMethodCallException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Exception/InvalidRequestException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/lib/Service/FileService.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: checkout, buy now, stripe

simple-stripe-button/simple-stripe-button.php Passed 13 tests

"Simple Stripe checkout buttons" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
45 characters long description:
The easiest way to add Stripe payment button.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/simple-stripe-button/inc/stripe-php-7.67.0/data/ca-certificates.crt
7,037 lines of code in 214 files:
LanguageFilesBlank linesComment linesLines of code
PHP2131,7738,8026,982
JavaScript11355

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity2.82
▷ Minimum class complexity1.00
▷ Maximum class complexity67.00
Average method complexity1.53
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces22
Interfaces6
Traits7
Classes197
▷ Abstract classes105.08%
▷ Concrete classes18794.92%
▷ Final classes00.00%
Methods665
▷ Static methods15523.31%
▷ Public methods60090.23%
▷ Protected methods284.21%
▷ Private methods375.56%
Functions17
▷ Named functions1058.82%
▷ Anonymous functions741.18%
Constants704
▷ Global constants20.28%
▷ Class constants70299.72%
▷ Public constants702100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin