68% payment-gateway-through-stripe-installments

Code Review | Payment Gateway through Stripe Installments

WordPress plugin Payment Gateway through Stripe Installments scored68%from 54 tests.

About plugin

  • Plugin page: payment-gateway-t...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.3
  • WordPress version: 6.3.1
  • First release: Sep 20, 2022
  • Latest release: Oct 30, 2022
  • Number of updates: 10
  • Update frequency: every 7.3 days
  • Top authors: antondrob2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /606 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.02MB] [CPU: ▼7.47ms] Passed 4 tests

An overview of server-side resources used by Payment Gateway through Stripe Installments
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.36 ▲0.23
Dashboard /wp-admin3.33 ▼0.0150.06 ▼8.38
Posts /wp-admin/edit.php3.38 ▲0.0345.37 ▼5.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0378.72 ▼16.32
Media Library /wp-admin/upload.php3.25 ▲0.0333.89 ▲0.84

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 308 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Payment Gateway through Stripe Installments: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.21 ▼1.471.96 ▲0.1241.59 ▼5.14
Dashboard /wp-admin2,206 ▲185.83 ▼0.06100.03 ▼1.1239.61 ▼5.34
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0133.68 ▼13.3633.16 ▼5.97
Add New Post /wp-admin/post-new.php1,528 ▼518.43 ▼4.80592.20 ▼88.4754.08 ▼12.00
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0195.10 ▼3.2741.40 ▼4.33

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/update_certs.php
    • > /wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/build.php
  • 249× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Service/FinancialConnections/AccountService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/FinancialConnections/AccountOwnership.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Service/Issuing/AuthorizationService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Service/Treasury/TransactionEntryService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Service/TestHelpers/Treasury/InboundTransferService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\StripeObject' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Collection.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Transfer.php:39
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Service/AccountService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Charge.php:68
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/lib/Service/ReviewService.php:7

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 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: payment, stripe, woocommerce, gateway, installments

payment-gateway-through-stripe-installments/wc-stripe-installments-payment-gateway.php 92% from 13 tests

The entry point to "Payment Gateway through Stripe Installments" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("payment-gateway-through-stripe-installments.php" instead of "wc-stripe-installments-payment-gateway.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/payment-gateway-through-stripe-installments/vendor/stripe/stripe-php/data/ca-certificates.crt
11,295 lines of code in 298 files:
LanguageFilesBlank linesComment linesLines of code
PHP2902,46712,1889,640
Markdown375501,394
JSON200116
JavaScript118285
XML10031
make110029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity2.89
▷ Minimum class complexity1.00
▷ Maximum class complexity74.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces37
Interfaces9
Traits8
Classes264
▷ Abstract classes103.79%
▷ Concrete classes25496.21%
▷ Final classes00.00%
Methods923
▷ Static methods19821.45%
▷ Public methods83690.57%
▷ Protected methods414.44%
▷ Private methods464.98%
Functions14
▷ Named functions17.14%
▷ Anonymous functions1392.86%
Constants995
▷ Global constants20.20%
▷ Class constants99399.80%
▷ Public constants993100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin