64% stripe-frontend-registration

Code Review | Stripe Frontend Registration

WordPress plugin Stripe Frontend Registration scored64%from 54 tests.

About plugin

  • Plugin page: stripe-frontend-r...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2014
  • Latest release: Jan 24, 2016
  • Number of updates: 11
  • Update frequency: every 41.2 days
  • Top authors: Prakash30 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,315 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.92MB] [CPU: ▼57.46ms] Passed 4 tests

This is a short check of server-side resources used by Stripe Frontend Registration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.405.41 ▼37.66
Dashboard /wp-admin2.08 ▼1.225.52 ▼45.76
Posts /wp-admin/edit.php2.09 ▼1.275.40 ▼46.37
Add New Post /wp-admin/post-new.php2.08 ▼3.805.98 ▼100.04
Media Library /wp-admin/upload.php2.08 ▼1.146.69 ▼31.81

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Stripe Frontend Registration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.60 ▼1.028.77 ▲7.1741.11 ▼1.97
Dashboard /wp-admin2,219 ▲395.71 ▲0.0686.02 ▼2.4880.89 ▲33.59
Posts /wp-admin/edit.php2,130 ▲302.03 ▲0.0838.59 ▲0.5633.13 ▼3.44
Add New Post /wp-admin/post-new.php1,701 ▲17322.43 ▼0.77694.27 ▲23.9644.55 ▼8.62
Media Library /wp-admin/upload.php1,421 ▲214.26 ▲0.14111.34 ▲2.7772.99 ▲26.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the inkthemes handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% 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 50% 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 fix the following items
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/Charge.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/BalanceTransaction.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/InvoiceItem.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/stripe-frontend-registration/registration_stripe_form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/stripe-frontend-registration/main.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/ApiError.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_SingletonApiResource' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/Account.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_ApiResource' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/Plan.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_col() on null in wp-content/plugins/stripe-frontend-registration/register_amount.php:147
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe_Error' not found in wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/Stripe/CardError.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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: stripe registartion, stripe, registration, front end registartion, secure registartion

stripe-frontend-registration/main.php 92% from 13 tests

The primary PHP file in "Stripe Frontend Registration" version 1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("stripe-frontend-registration.php" instead of "main.php")

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
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/stripe-frontend-registration/includes/stripe/lib/data/ca-certificates.crt
1,793 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP33311791,763
CSS10016
JavaScript23014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.60
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes30
▷ Abstract classes413.33%
▷ Concrete classes2686.67%
▷ Final classes00.00%
Methods146
▷ Static methods7450.68%
▷ Public methods13391.10%
▷ Protected methods85.48%
▷ Private methods53.42%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/prakash.png0.21KB0.18KB▼ 15.02%
images/prakash.png0.21KB0.18KB▼ 15.02%