51% front-end-only-users

Code Review | Front End Users

WordPress plugin Front End Users scored51%from 54 tests.

About plugin

  • Plugin page: front-end-only-users
  • Plugin version: 3.2.27
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Jan 20, 2014
  • Latest release: Nov 7, 2023
  • Number of updates: 523
  • Update frequency: every 6.9 days
  • Top authors: Rustaurius (100%)

Code review

54 tests

User reviews

55 reviews

Install metrics

800+ active /220,102 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
Install script ran successfully

Server metrics [RAM: ▲1.91MB] [CPU: ▲6.11ms] Passed 4 tests

An overview of server-side resources used by Front End Users
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.34 ▲1.8853.11 ▲6.59
Dashboard /wp-admin5.20 ▲1.9059.47 ▲2.08
Posts /wp-admin/edit.php5.30 ▲1.9466.07 ▲17.23
Add New Post /wp-admin/post-new.php7.92 ▲2.0392.08 ▲0.16
Media Library /wp-admin/upload.php5.16 ▲1.9349.75 ▲15.61
Levels /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Levels5.6789.68
F-E Users /wp-admin/admin.php?page=EWD-FEUP-options5.6579.12
Payments /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Payment5.6679.74
Users /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Users5.6681.13
Fields /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Field5.6677.70
Statistics /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Statistics5.6677.84
Emails /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Emails5.6681.17
Options /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Options5.6681.54

Server storage [IO: ▲8.08MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 708 new files
Database: 6 new tables, 60 new options
New tables
wp_EWD_FEUP_User_Events
wp_EWD_FEUP_Payments
wp_EWD_FEUP_Users
wp_EWD_FEUP_Levels
wp_EWD_FEUP_User_Fields
wp_EWD_FEUP_Fields
New WordPress options
EWD_FEUP_WooCommerce_City_Field
EWD_FEUP_WooCommerce_Email_Field
EWD_FEUP_Include_WP_Users
EWD_FEUP_WooCommerce_Address_Line_Two_Field
EWD_FEUP_db_version
EWD_FEUP_Last_User_Return_Check
EWD_FEUP_WooCommerce_State_Field
EWD_FEUP_Run_Tutorial
EWD_FEUP_Install_Time
EWD_FEUP_Membership_Cost
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Front End Users
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲19213.55 ▼1.028.68 ▲6.8339.25 ▼3.76
Dashboard /wp-admin2,252 ▲775.73 ▲0.1088.60 ▼20.0138.87 ▼6.24
Posts /wp-admin/edit.php2,234 ▲1342.03 ▲0.0641.37 ▲4.2535.16 ▼3.70
Add New Post /wp-admin/post-new.php6,411 ▲4,88528.22 ▲4.54950.00 ▲265.1642.80 ▼15.37
Media Library /wp-admin/upload.php1,457 ▲634.29 ▲0.11100.99 ▲4.4441.95 ▲1.53
Levels /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Levels8,6934.67126.0872.71
F-E Users /wp-admin/admin.php?page=EWD-FEUP-options8,6664.1098.2385.26
Payments /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Payment8,6434.1293.6032.64
Users /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Users8,6404.0692.8932.99
Fields /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Field8,8054.2697.4271.28
Statistics /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Statistics8,6394.0797.8633.24
Emails /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Emails8,6554.13100.3788.35
Options /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Options8,6564.0999.8657.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 6 tables
    • wp_EWD_FEUP_Fields
    • wp_EWD_FEUP_Users
    • wp_EWD_FEUP_Levels
    • wp_EWD_FEUP_Payments
    • wp_EWD_FEUP_User_Events
    • wp_EWD_FEUP_User_Fields
  • This plugin does not fully uninstall, leaving 59 options in the database
    • EWD_FEUP_Sign_Up_Email
    • EWD_FEUP_Thank_You_URL
    • EWD_FEUP_Discount_Codes_Array
    • EWD_FEUP_Include_WP_Users
    • db_upgraded
    • EWD_FEUP_WooCommerce_Integration
    • EWD_FEUP_Mailchimp_Integration
    • EWD_FEUP_WooCommerce_Address_Line_One_Field
    • EWD_FEUP_Levels_Payment_Array
    • EWD_FEUP_WooCommerce_Country_Field
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 8× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/markbaker/complex/examples/testOperations.php
    • > /wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/markbaker/matrix/examples/test.php
    • > /wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/markbaker/complex/examples/complexTest.php
    • > /wp-content/plugins/front-end-only-users/Functions/EWD_FEUP_Create_Captcha_Image.php
    • > /wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/markbaker/complex/examples/testFunctions.php
    • > /wp-content/plugins/front-end-only-users/html/AdminFooter.php
    • > /wp-content/plugins/front-end-only-users/stripe/build.php
  • 271× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\DefinedName' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/NamedFormula.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/front-end-only-users/stripe/tests/RefundTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ZipStream\\Exception' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/maennchen/zipstream-php/src/Exception/StreamNotReadableException.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/front-end-only-users/Functions/Output_Buffering.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Reader\\BaseReader' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/Html.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/RelsRibbon.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/front-end-only-users/stripe/tests/ApiRequestorTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\Reader\\IReadFilter' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Reader/DefaultReadFilter.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Style/Protection.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/front-end-only-users/PHPSpreadsheet/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Style.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Levels
    • > Deprecation (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1 Listener added for a synchronous 'DOMNodeInserted' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
    • > GET request to /wp-admin/admin.php?page=EWD-FEUP-options&DisplayPage=Emails
    • > Network (severe)
    wp-content/plugins/order-tracking/images/options-asset-info.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: You are using too many tags: 30 tag instead of maximum 10
The official readme.txt might help

front-end-only-users/Main.php 85% from 13 tests

The entry point to "Front End Users" version 3.2.27 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("front-end-only-users.php" instead of "Main.php")
  • Description: The description should be shorter than 140 characters (currently 188 characters long)

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Please make sure to remedy the following
  • Do not distribute dangerous files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/front-end-only-users/stripe/data/ca-certificates.crt
97,900 lines of code in 610 files:
LanguageFilesBlank linesComment linesLines of code
PHP53116,54334,84982,515
CSS73031624,492
PO File81,6552,2604,189
JavaScript186024333,985
Markdown2359601,388
JSON12001,169
XML6182124
YAML53038

PHP code 0% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,022)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.78
▷ Minimum class complexity1.00
▷ Maximum class complexity1,022.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces62
Interfaces31
Traits0
Classes356
▷ Abstract classes246.74%
▷ Concrete classes33293.26%
▷ Final classes41.20%
Methods3,920
▷ Static methods94023.98%
▷ Public methods3,01876.99%
▷ Protected methods1233.14%
▷ Private methods77919.87%
Functions310
▷ Named functions29093.55%
▷ Anonymous functions206.45%
Constants871
▷ Global constants91.03%
▷ Class constants86298.97%
▷ Public constants85799.42%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
35 PNG files occupy 1.67MB with 1.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ewd-support-icon-forum.png5.77KB2.17KB▼ 62.41%
images/options-asset-lock.png1.05KB0.50KB▼ 52.28%
images/ewd-support-icon-youtube.png1.75KB0.66KB▼ 62.56%
images/ewd-uwpm-icon.png183.39KB59.73KB▼ 67.43%
images/Icon_Documentation_Grey.png21.20KB6.73KB▼ 68.26%