78% buy-now-plus

Code Review | Stripe Payments by Buy Now Plus - Best WordPress Stripe Credit Card Payments Plugin

WordPress plugin Stripe Payments by Buy Now Plus - Best WordPress Stripe Credit Card Payments Plugin scored78%from 54 tests.

About plugin

  • Plugin page: buy-now-plus
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 9, 2016
  • Latest release: Jun 13, 2023
  • Number of updates: 9
  • Update frequency: every 284.4 days
  • Top authors: cartpauj (44.44%)caspyin (44.44%)supercleanse (33.33%)

Code review

54 tests

User reviews

4 reviews

Install metrics

30+ active /2,329 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
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.10ms] Passed 4 tests

Server-side resources used by Stripe Payments by Buy Now Plus - Best WordPress Stripe Credit Card Payments Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0440.38 ▼2.09
Dashboard /wp-admin3.34 ▲0.0449.18 ▲2.63
Posts /wp-admin/edit.php3.45 ▲0.1043.47 ▼1.51
Add New Post /wp-admin/post-new.php5.92 ▲0.0487.80 ▼7.42
Media Library /wp-admin/upload.php3.26 ▲0.0436.32 ▲2.65
Buy Now Plus /wp-admin/options-general.php?page=buy-now-plus3.2230.78

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Stripe Payments by Buy Now Plus - Best WordPress Stripe Credit Card Payments Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.24 ▼1.501.65 ▼0.1444.38 ▲1.12
Dashboard /wp-admin2,212 ▲246.01 ▲1.12100.63 ▼5.5043.85 ▼1.69
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0532.80 ▼4.9534.29 ▲1.48
Add New Post /wp-admin/post-new.php1,533 ▲1422.99 ▼0.18618.54 ▼26.7851.72 ▼1.80
Media Library /wp-admin/upload.php1,394 ▲94.23 ▲0.1195.58 ▼8.0041.23 ▼0.63
Buy Now Plus /wp-admin/options-general.php?page=buy-now-plus7852.0323.9225.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=buy-now-plus
    • > Notice in wp-content/plugins/buy-now-plus/class-bnp-settings.php+29
    Trying to access array offset on value of type bool

SRP 50% 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
The following issues need your attention
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/buy-now-plus/class-bnp-buttons.php
    • > /wp-content/plugins/buy-now-plus/views/settings-template.php
    • > /wp-content/plugins/buy-now-plus/main.php
    • > /wp-content/plugins/buy-now-plus/class-bnp-editor.php
    • > /wp-content/plugins/buy-now-plus/class-bnp-settings.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
The official readme.txt is a good inspiration

buy-now-plus/main.php 92% from 13 tests

"Stripe Payments by Buy Now Plus - Best WordPress Stripe Credit Card Payments Plugin" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("buy-now-plus.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin238 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55219159
JavaScript19454
CSS11025

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.33
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods00.00%
▷ Private methods16.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/BUY_128X128_white.png3.90KB2.51KB▼ 35.51%
images/BUY_64X64_white.png1.92KB1.35KB▼ 29.71%