74% music-store-stripe-add-on

Code Review | Music Store - Stripe Add On

WordPress plugin Music Store - Stripe Add On scored74%from 54 tests.

About plugin

  • Plugin page: music-store-strip...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3
  • WordPress version: 6.3.1
  • First release: Apr 23, 2019
  • Latest release: Sep 12, 2023
  • Number of updates: 34
  • Update frequency: every 47.1 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /4,471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.64ms] Passed 4 tests

A check of server-side resources used by Music Store - Stripe Add On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1245.82 ▲5.66
Dashboard /wp-admin3.42 ▲0.1148.71 ▼1.30
Posts /wp-admin/edit.php3.53 ▲0.1749.34 ▼3.64
Add New Post /wp-admin/post-new.php6.00 ▲0.1186.39 ▼10.84
Media Library /wp-admin/upload.php3.34 ▲0.1142.60 ▲5.21

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 297 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Music Store - Stripe Add On
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.16 ▼0.221.76 ▼0.2542.35 ▼7.99
Dashboard /wp-admin2,195 ▲215.61 ▼0.0888.98 ▼12.5840.43 ▼3.36
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0436.46 ▼10.6634.38 ▼5.00
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▲0.21656.93 ▲13.2262.93 ▲11.67
Media Library /wp-admin/upload.php1,403 ▲34.18 ▲0.03100.68 ▼8.5948.15 ▲2.69

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
Please fix the following
  • 254× 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/music-store-stripe-add-on/stripe-php.addon/lib/ShippingRate.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Service/TopupService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Service/ChargeService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Service/BalanceTransactionService.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\Exception\\ExceptionInterface' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Exception/SignatureVerificationException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Exception\\OAuth\\OAuthErrorException' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Exception/OAuth/InvalidRequestException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Terminal/Reader.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/BillingPortal/Configuration.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/Service/TestHelpers/Issuing/CardService.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/music-store-stripe-add-on/stripe-php.addon/lib/CustomerCashBalanceTransaction.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: payment gateway, music store, credit card, debit card, stripe

music-store-stripe-add-on/stripe.addon.php 85% from 13 tests

"Music Store - Stripe Add On" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("music-store-stripe-add-on.php" instead of "stripe.addon.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
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/music-store-stripe-add-on/stripe-php.addon/data/ca-certificates.crt
11,666 lines of code in 290 files:
LanguageFilesBlank linesComment linesLines of code
PHP2862,38811,8049,920
Markdown280901,633
PO File1232365
JSON10048

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.94
▷ Minimum class complexity1.00
▷ Maximum class complexity131.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces36
Interfaces9
Traits9
Classes268
▷ Abstract classes103.73%
▷ Concrete classes25896.27%
▷ Final classes00.00%
Methods895
▷ Static methods18120.22%
▷ Public methods80790.17%
▷ Protected methods414.58%
▷ Private methods475.25%
Functions13
▷ Named functions00.00%
▷ Anonymous functions13100.00%
Constants1,464
▷ Global constants20.14%
▷ Class constants1,46299.86%
▷ Public constants1,462100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin