74% simple-stripe

Code Review | Simple Stripe

WordPress plugin Simple Stripe scored74%from 54 tests.

About plugin

  • Plugin page: simple-stripe
  • Plugin version: 0.9.13
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.9-6.3
  • WordPress version: 6.3.1
  • First release: Jul 29, 2020
  • Latest release: Jul 26, 2023
  • Number of updates: 39
  • Update frequency: every 28.0 days
  • Top authors: back2nature (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,881 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.45ms] Passed 4 tests

A check of server-side resources used by Simple Stripe
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.88 ▼1.73
Dashboard /wp-admin3.36 ▲0.0643.57 ▼8.03
Posts /wp-admin/edit.php3.41 ▲0.0543.69 ▼3.13
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.11 ▼14.22
Media Library /wp-admin/upload.php3.28 ▲0.0534.67 ▼4.40
Simple Stripe /wp-admin/options-general.php?page=simple-stripe3.4733.85

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 314 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
simple_stripe_settings
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Stripe
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.48 ▲0.101.68 ▼0.1941.94 ▼1.05
Dashboard /wp-admin2,207 ▲215.77 ▲0.8496.07 ▼14.0338.86 ▼2.07
Posts /wp-admin/edit.php2,093 ▲72.02 ▼0.0237.15 ▲2.1835.02 ▲3.92
Add New Post /wp-admin/post-new.php1,517 ▼1117.68 ▼5.48638.29 ▼16.3548.11 ▼15.96
Media Library /wp-admin/upload.php1,392 ▲44.24 ▲0.0092.07 ▼22.5243.64 ▼4.53
Simple Stripe /wp-admin/options-general.php?page=simple-stripe3,0573.0442.15128.97

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
Please fix the following items
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • simple_stripe_settings
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 249× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/Reporting/ReportTypeService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/Radar/ValueListItemService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/Checkout/SessionService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/TestHelpers/CustomerService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Refund.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/OAuthService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/Treasury/FinancialAccountService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Issuing/Cardholder.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/simple-stripe/stripe-php-master/lib/Service/TestHelpers/Terminal/ReaderService.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: payments, stripe checkout, stripe, credit card, stripe payments

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

The main PHP file in "Simple Stripe" ver. 0.9.13 adds more information about the plugin and also serves as the entry point for this plugin
100 characters long description:
Just register your Stripe API key and use the shortcode.You can easily make a payment page anywhere.

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
Please 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/simple-stripe/stripe-php-master/data/ca-certificates.crt
12,398 lines of code in 304 files:
LanguageFilesBlank linesComment linesLines of code
PHP2882,53011,6209,670
Markdown278601,559
PO File1263297525
JavaScript621436415
CSS4250162
JSON10048
SVG20019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.52
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity1.45
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces36
Interfaces9
Traits9
Classes263
▷ Abstract classes103.80%
▷ Concrete classes25396.20%
▷ Final classes00.00%
Methods873
▷ Static methods18120.73%
▷ Public methods78990.38%
▷ Protected methods414.70%
▷ Private methods434.93%
Functions26
▷ Named functions1453.85%
▷ Anonymous functions1246.15%
Constants1,071
▷ Global constants50.47%
▷ Class constants1,06699.53%
▷ Public constants1,066100.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
No PNG images were found in this plugin