53% fast-payments-for-stripe

Code Review | WP Fast Payments for Stripe

WordPress plugin WP Fast Payments for Stripe scored53%from 54 tests.

About plugin

  • Plugin page: fast-payments-for...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.5
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Jul 1, 2016
  • Number of updates: 6
  • Update frequency: every 1.8 days
  • Top authors: codelabllc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /734 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
Installer ran successfully

Server metrics [RAM: ▼1.88MB] [CPU: ▼57.44ms] Passed 4 tests

Analyzing server-side resources used by WP Fast Payments for Stripe
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.404.08 ▼38.05
Dashboard /wp-admin2.15 ▼1.207.78 ▼56.66
Posts /wp-admin/edit.php2.15 ▼1.216.74 ▼43.72
Add New Post /wp-admin/post-new.php2.15 ▼3.747.04 ▼91.31
Media Library /wp-admin/upload.php2.15 ▼1.087.92 ▼27.32
Shortcodes /wp-admin/admin.php?page=wpfastpaymentshelppage2.156.21
Fast Payments /wp-admin/admin.php?page=wpfastpaymentsadminpage2.157.44

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 115 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Fast Payments for Stripe
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.27 ▼1.031.69 ▼0.0140.83 ▼1.72
Dashboard /wp-admin2,236 ▲485.83 ▼0.05106.54 ▼12.6674.20 ▲27.67
Posts /wp-admin/edit.php2,125 ▲362.02 ▲0.0136.22 ▼1.0332.75 ▲0.29
Add New Post /wp-admin/post-new.php1,545 ▲1222.91 ▼0.20732.03 ▲77.9461.03 ▲5.02
Media Library /wp-admin/upload.php1,412 ▲304.18 ▲0.02105.68 ▲8.2367.23 ▲27.66
Shortcodes /wp-admin/admin.php?page=wpfastpaymentshelppage8222.0123.8225.36
Fast Payments /wp-admin/admin.php?page=wpfastpaymentsadminpage9422.0324.1524.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fast-payments-for-stripe-default-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpfastpaymentsadminpage
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fast-payments-for-stripe-default-css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpfastpaymentsadminpage
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the fast-payments-for-stripe-default-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/fast-payments-for-stripe/includes/fast-payments-for-stripe-shortcode-manager.php
    • > /wp-content/plugins/fast-payments-for-stripe/views/fast-payments-for-stripe-help.php
    • > /wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/build.php
  • 82× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/lib/Plan.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/tests/CurlClientTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/tests/SubscriptionTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/lib/CountrySpec.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/tests/ApplicationFeeTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/lib/TransferReversal.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/tests/DiscountTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ExternalAccount' not found in wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/lib/AlipayAccount.php:5

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 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
8 plugin tags: merchant account, checkout, e-commerce, stripe, credit cards...

fast-payments-for-stripe/fast-payments-for-stripe.php Passed 13 tests

Analyzing the main PHP file in "WP Fast Payments for Stripe" version 1.0.0
40 characters long description:
Process credit card payments via stripe.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/fast-payments-for-stripe/includes/stripe-php-3.12.1/data/ca-certificates.crt
5,578 lines of code in 108 files:
LanguageFilesBlank linesComment linesLines of code
PHP1011,0041,2295,179
Markdown21710264
CSS20069
JSON10036
XML20030

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.01
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes92
▷ Abstract classes55.43%
▷ Concrete classes8794.57%
▷ Final classes00.00%
Methods421
▷ Static methods12028.50%
▷ Public methods37288.36%
▷ Protected methods214.99%
▷ Private methods286.65%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/stripe-php-3.12.1/data/test.png0.09KB0.09KB0.00%
img/fp_16x16.png0.77KB0.61KB▼ 21.31%