78% payment-gateway-stripe-for-easy-digital-downloads

Code Review | Payment Gateway Stripe for Easy Digital Downloads

WordPress plugin Payment Gateway Stripe for Easy Digital Downloads scored78%from 54 tests.

About plugin

  • Plugin page: payment-gateway-s...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Dec 28, 2019
  • Latest release: Dec 28, 2019
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: bhoot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /708 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.06ms] Passed 4 tests

An overview of server-side resources used by Payment Gateway Stripe for Easy Digital Downloads
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0944.39 ▼3.19
Dashboard /wp-admin61.27 ▲57.9311,964,449.00 ▲11,964,395.04
Posts /wp-admin/edit.php3.54 ▲0.1451.50 ▲1.24
Add New Post /wp-admin/post-new.php6.01 ▲0.0886.25 ▼16.22
Media Library /wp-admin/upload.php3.35 ▲0.0839.00 ▲1.94

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Payment Gateway Stripe for Easy Digital Downloads
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.38 ▲0.022.21 ▲0.6944.20 ▲0.52
Dashboard /wp-admin2,204 ▲245.59 ▼0.0084.78 ▼3.6744.00 ▼2.69
Posts /wp-admin/edit.php2,109 ▲92.00 ▲0.0435.02 ▼1.3235.98 ▼3.43
Add New Post /wp-admin/post-new.php1,532 ▲623.68 ▲0.21672.67 ▼40.6457.80 ▼2.33
Media Library /wp-admin/upload.php1,400 ▼04.13 ▼0.0799.67 ▼8.4244.72 ▼1.29

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
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though no errors were found, this is by no means an exhaustive test

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
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/payment-gateway-stripe-for-easy-digital-downloads/tests/bootstrap.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/payment-gateway-stripe-for-easy-digital-downloads/tests/test-sample.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: edd, stripe, credit card

payment-gateway-stripe-for-easy-digital-downloads/payment-gateway-stripe-for-easy-digital-downloads.php 92% from 13 tests

The main file in "Payment Gateway Stripe for Easy Digital Downloads" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin12,736 lines of code in 54 files:
LanguageFilesBlank linesComment linesLines of code
JSON40010,087
PHP183547361,381
JavaScript7116165585
SVG1809332
Bourne Shell12111123
YAML17060
Markdown123055
XML241249
Sass17033
CSS10031

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.17
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods101
▷ Static methods1817.82%
▷ Public methods8483.17%
▷ Protected methods98.91%
▷ Private methods87.92%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants9
▷ Global constants777.78%
▷ Class constants222.22%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin