48% wpadmin-stripe-payment-gateway

Code Review | WPAdmin Stripe Payment & Donation

WordPress plugin WPAdmin Stripe Payment & Donation scored48%from 54 tests.

About plugin

  • Plugin page: wpadmin-stripe-pa...
  • Plugin version: 2.6.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2018
  • Latest release: Nov 16, 2022
  • Number of updates: 81
  • Update frequency: every 18.0 days
  • Top authors: luckychingi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,738 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.37MB] [CPU: ▼23.72ms] Passed 4 tests

An overview of server-side resources used by WPAdmin Stripe Payment & Donation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.72 ▲2.2638.82 ▲0.77
Dashboard /wp-admin5.33 ▲1.9839.16 ▼23.82
Posts /wp-admin/edit.php5.33 ▲1.9738.14 ▼7.08
Add New Post /wp-admin/post-new.php5.33 ▼0.5634.13 ▼64.75
Media Library /wp-admin/upload.php5.33 ▲2.1038.88 ▲5.56
Shortcode Generator /wp-admin/admin.php?page=wpadmin-stripe-shortcode5.3333.28
Report /wp-admin/admin.php?page=wpadmin-stripe-report5.3335.18
WPAdmin Stripe /wp-admin/admin.php?page=wpa-stripe5.3335.81

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 240 new files
Database: 1 new table, 6 new options
New tables
wp_wpastripetbl
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

WPAdmin Stripe Payment & Donation: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,988 ▲24216.95 ▲2.64157.09 ▲155.3240.94 ▲0.41
Dashboard /wp-admin2,241 ▲534.93 ▲0.06114.50 ▲0.7743.05 ▼4.70
Posts /wp-admin/edit.php2,124 ▲352.03 ▼0.0136.73 ▼0.2831.91 ▼2.72
Add New Post /wp-admin/post-new.php1,543 ▲2923.36 ▲5.72663.58 ▲6.5165.01 ▲4.06
Media Library /wp-admin/upload.php1,423 ▲354.22 ▲0.0299.85 ▼0.0442.06 ▼3.02
Shortcode Generator /wp-admin/admin.php?page=wpadmin-stripe-shortcode1,6951.7228.1330.32
Report /wp-admin/admin.php?page=wpadmin-stripe-report9231.7125.1426.28
WPAdmin Stripe /wp-admin/admin.php?page=wpa-stripe9072.0424.7834.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpastripetbl
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpa-stripe
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=wpadmin-stripe-shortcode
    • > Notice in wp-content/plugins/wpadmin-stripe-payment-gateway/admin/wpadmin-stripe-shortcode.php+46
    Undefined index: id
    • > GET request to /wp-admin/admin.php?page=wpadmin-stripe-shortcode
    • > Notice in wp-content/plugins/wpadmin-stripe-payment-gateway/admin/wpadmin-stripe-shortcode.php+51
    Undefined index: del
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpa-stripe
    • > Notice in wp-content/plugins/wpadmin-stripe-payment-gateway/admin/wpa-stripe-admin.php+86
    Undefined variable: savedData
  • 20 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpa-stripe
    • > Notice in wp-content/plugins/wpadmin-stripe-payment-gateway/admin/wpa-stripe-admin.php+86
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=wpadmin-stripe-report
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)

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 items
  • 202× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/PaymentIntent.php:56
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractServiceFactory' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Service/Radar/RadarServiceFactory.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Service/FileService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/TransferReversal.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Service/Issuing/AuthorizationService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Service/Radar/ValueListItemService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'wpastripe' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/admin/class-wpadmin-stripe-admin.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Error/Idempotency.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Service/CustomerService.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Service\\AbstractService' not found in wp-content/plugins/wpadmin-stripe-payment-gateway/lib/Service/CreditNoteService.php:5

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 errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

wpadmin-stripe-payment-gateway/wpadmin-stripe-payment-gateway.php 92% from 13 tests

Analyzing the main PHP file in "WPAdmin Stripe Payment & Donation" version 2.6.1
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 144 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wpadmin-stripe-payment-gateway/data/ca-certificates.crt
8,654 lines of code in 234 files:
LanguageFilesBlank linesComment linesLines of code
PHP2321,7178,4687,962
CSS1105546
JavaScript1225146

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.92
▷ Minimum class complexity1.00
▷ Maximum class complexity60.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces23
Interfaces6
Traits7
Classes214
▷ Abstract classes115.14%
▷ Concrete classes20394.86%
▷ Final classes00.00%
Methods695
▷ Static methods15622.45%
▷ Public methods63691.51%
▷ Protected methods273.88%
▷ Private methods324.60%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants669
▷ Global constants71.05%
▷ Class constants66298.95%
▷ Public constants662100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin