68% paypal-frontend-registration

Code Review | Paypal Frontend Registration

WordPress plugin Paypal Frontend Registration scored68%from 54 tests.

About plugin

  • Plugin page: paypal-frontend-r...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.5.1
  • WordPress version: 6.3.1
  • First release: Apr 9, 2014
  • Latest release: Sep 9, 2020
  • Number of updates: 54
  • Update frequency: every 43.5 days
  • Top authors: Prakash30 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,381 total downloads

Benchmarks

Plugin footprint 65% 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.96MB] [CPU: ▼53.21ms] Passed 4 tests

An overview of server-side resources used by Paypal Frontend Registration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.15 ▼32.69
Dashboard /wp-admin2.05 ▼1.265.21 ▼39.96
Posts /wp-admin/edit.php2.05 ▼1.315.67 ▼45.76
Add New Post /wp-admin/post-new.php2.05 ▼3.845.70 ▼94.43
Media Library /wp-admin/upload.php2.05 ▼1.184.62 ▼26.56
Paypal Register /wp-admin/admin.php?page=paypal-frontend-registration/main.php2.055.17
Payments /wp-admin/admin.php?page=payments2.055.08
Junk Users /wp-admin/admin.php?page=junk-users2.056.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Paypal Frontend Registration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲22514.05 ▼0.325.11 ▲3.1840.84 ▼3.08
Dashboard /wp-admin2,243 ▲525.87 ▲0.9995.31 ▼4.4574.82 ▲31.01
Posts /wp-admin/edit.php2,129 ▲372.01 ▼0.0439.41 ▼1.3437.79 ▲1.26
Add New Post /wp-admin/post-new.php1,709 ▲19524.50 ▲6.94685.50 ▲93.9558.59 ▲9.33
Media Library /wp-admin/upload.php1,416 ▲284.31 ▲0.13101.75 ▲2.5670.24 ▲25.60
Paypal Register /wp-admin/admin.php?page=paypal-frontend-registration/main.php9872.2024.9123.91
Payments /wp-admin/admin.php?page=payments9372.0724.2426.64
Junk Users /wp-admin/admin.php?page=junk-users9222.0828.8231.68

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > 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 stripe_frontend handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=junk-users
    • > 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 stripe_frontend handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=junk-users
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method pra_paypal::init() should not be called statically
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=junk-users
    • > 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=payments
    • > Notice in wp-content/plugins/paypal-frontend-registration/payments.php+140
    Undefined variable: data
    • > GET request to /wp-admin/admin.php?page=payments
    • > Warning in wp-content/plugins/paypal-frontend-registration/payments.php+26
    usort() expects parameter 1 to be array, null given
    • > GET request to /wp-admin/admin.php?page=payments
    • > Warning in wp-content/plugins/paypal-frontend-registration/payments.php+30
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=payments
    • > Warning in wp-content/plugins/paypal-frontend-registration/payments.php+37
    array_slice() expects parameter 1 to be array, null given

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
Almost there! Just fix the following items
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_col() on null in wp-content/plugins/paypal-frontend-registration/register_amount.php:144
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/paypal-frontend-registration/payments.php on line 6
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/paypal-frontend-registration/junk-users.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/paypal-frontend-registration/payments.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/paypal-frontend-registration/main.php:13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/paypal-frontend-registration/junk-users.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/paypal-frontend-registration/payments.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/paypal-frontend-registration/junk-users.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: registration, secure registartion, front end registartion, paypal, paypal registartion

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

The main file in "Paypal Frontend Registration" v. 3.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("paypal-frontend-registration.php" instead of "main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin938 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5251131903
CSS11122
JavaScript15013

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 complexity6.67
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
images/prakash.png0.21KB0.18KB▼ 15.02%
css/images/prakash.png0.21KB0.18KB▼ 15.02%