73% s2-donation-using-stripe

Code Review | S2 Donation using Stripe

WordPress plugin S2 Donation using Stripe scored 73% from 54 tests.

About plugin

  • Plugin page: s2-donation-using...
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8.1
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Jul 29, 2023
  • Number of updates: 16
  • Update frequency: every 58.0 days
  • Top authors: shubanstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 539 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.40MB] [CPU: ▼3.62ms] Passed 4 tests

This is a short check of server-side resources used by S2 Donation using Stripe
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4439.80 ▼2.76
Dashboard /wp-admin3.73 ▲0.4357.37 ▲6.86
Posts /wp-admin/edit.php3.78 ▲0.4347.73 ▼5.80
Add New Post /wp-admin/post-new.php6.25 ▲0.3787.93 ▼11.69
Media Library /wp-admin/upload.php3.59 ▲0.3640.19 ▲5.76
Donation /wp-admin/admin.php?page=s2-donation3.5733.08

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 40 new files
Database: 1 new table, 7 new options
New tables
wp_s2_donation
New WordPress options
widget_recent-comments
widget_recent-posts
s2_donation_db_version
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by S2 Donation using Stripe
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,936 ▲20113.56 ▼0.904.99 ▲3.3343.89 ▼3.68
Dashboard /wp-admin2,228 ▲405.90 ▲0.02113.42 ▼1.0742.82 ▲0.05
Posts /wp-admin/edit.php2,114 ▲252.03 ▼0.0239.08 ▼0.7434.23 ▼2.40
Add New Post /wp-admin/post-new.php1,558 ▲2518.13 ▼5.17633.19 ▼21.1360.71 ▲4.50
Media Library /wp-admin/upload.php1,407 ▲224.20 ▼0.0496.41 ▼9.4741.91 ▼1.78
Donation /wp-admin/admin.php?page=s2-donation9782.0930.0826.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_s2_donation
  • Zombie WordPress options were found after uninstall: 7 options
    • s2_donation_db_version
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=s2-donation
    • > Notice in wp-content/plugins/s2-donation-using-stripe/templates/admin/report-page.php+30
    Undefined index: section

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7 in s2-donation-using-stripe/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

s2-donation-using-stripe/init.php 77% from 13 tests

"S2 Donation using Stripe" version 1.0.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 154 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("s2-donation-using-stripe.php" instead of "init.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,400 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP275821,2942,199
JavaScript45923112
CSS5112789

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.80
▷ Minimum class complexity2.00
▷ Maximum class complexity57.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods106
▷ Static methods1615.09%
▷ Public methods10296.23%
▷ Protected methods10.94%
▷ Private methods32.83%
Functions21
▷ Named functions2095.24%
▷ Anonymous functions14.76%
Constants15
▷ Global constants1280.00%
▷ Class constants320.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin