83% donation-block-for-stripe-by-givewp

Code Review | Donation Form Block for Stripe

WordPress plugin Donation Form Block for Stripe scored83%from 54 tests.

About plugin

  • Plugin page: donation-block-fo...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 9, 2022
  • Latest release: Feb 9, 2023
  • Number of updates: 20
  • Update frequency: every 16.9 days
  • Top authors: dlocc (60%)jason_the_adams (40%)webdevmattcrom (10%)

Code review

54 tests

User reviews

1 review

Install metrics

900+ active /6,900 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.83ms] Passed 4 tests

Analyzing server-side resources used by Donation Form Block for Stripe
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.91 ▲0.40
Dashboard /wp-admin3.34 ▼0.0150.17 ▼13.24
Posts /wp-admin/edit.php3.39 ▲0.0349.99 ▲3.80
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.95 ▼13.31
Media Library /wp-admin/upload.php3.26 ▲0.0336.13 ▲2.83

Server storage [IO: ▲1.67MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Donation Form Block for Stripe
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.61 ▼0.911.95 ▲0.3144.12 ▲4.25
Dashboard /wp-admin2,200 ▲125.79 ▼0.10101.88 ▼8.4840.49 ▼6.87
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0236.74 ▲0.4935.89 ▲1.41
Add New Post /wp-admin/post-new.php6,191 ▲4,67220.11 ▼3.04945.13 ▲338.8039.56 ▼23.36
Media Library /wp-admin/upload.php1,379 ▼124.20 ▲0.0098.00 ▼2.7941.59 ▼2.47

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/donation-block-for-stripe-by-givewp/donation-block-for-stripe.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: donation, block, stripe, fundraise, donate

donation-block-for-stripe-by-givewp/donation-block-for-stripe.php 77% from 13 tests

The primary PHP file in "Donation Form Block for Stripe" version 1.3.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("donation-block-for-stripe-by-givewp.php" instead of "donation-block-for-stripe.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
No dangerous file extensions were detected1,570 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP192294671,053
Sass26224294
JSON400114
SVG1000105
CSS1002
JavaScript3012

PHP code Passed 2 tests

Analyzing 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.42
Average class complexity11.75
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods59
▷ Static methods2338.98%
▷ Public methods5491.53%
▷ Protected methods00.00%
▷ Private methods58.47%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin