68% profile-extra-fields

Code Review | Profile Extra Fields by BestWebSoft

WordPress plugin Profile Extra Fields by BestWebSoft scored68%from 54 tests.

About plugin

  • Plugin page: profile-extra-fields
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Aug 18, 2015
  • Latest release: Oct 5, 2023
  • Number of updates: 54
  • Update frequency: every 55.0 days
  • Top authors: bestwebsoft (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /60,022 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.54MB] [CPU: ▲7.03ms] Passed 4 tests

A check of server-side resources used by Profile Extra Fields by BestWebSoft
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.07 ▲1.6048.61 ▲8.21
Dashboard /wp-admin4.89 ▲1.5457.28 ▼2.55
Posts /wp-admin/edit.php4.94 ▲1.5867.38 ▲22.16
Add New Post /wp-admin/post-new.php7.43 ▲1.54107.92 ▲2.26
Media Library /wp-admin/upload.php4.75 ▲1.5257.14 ▲20.19

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 150 new files
Database: 7 new tables, 8 new options
New tables
wp_prflxtrflds_roles_and_fields
wp_prflxtrflds_user_field_data
wp_prflxtrflds_user_roles
wp_prflxtrflds_field_values
wp_prflxtrflds_fields_meta
wp_prflxtrflds_fields_id
wp_prflxtrflds_roles_id
New WordPress options
prflxtrflds_options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
bstwbsftwppdtplgns_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Profile Extra Fields by BestWebSoft
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9214.63 ▲0.271.47 ▼0.2340.06 ▼3.42
Dashboard /wp-admin2,242 ▲625.65 ▲0.0392.43 ▲7.9544.50 ▲4.85
Posts /wp-admin/edit.php2,319 ▲2192.22 ▲0.2536.44 ▼3.7537.11 ▼0.04
Add New Post /wp-admin/post-new.php1,886 ▲35724.48 ▲1.37709.86 ▲58.5862.59 ▲5.29
Media Library /wp-admin/upload.php1,447 ▲474.21 ▲0.09104.88 ▼4.5148.03 ▲2.24
Settings /wp-admin/profile-extra-fields-settings.php260.420.1513.44
BWS Panel /wp-admin/profile-extra-fields.php?page=prflxtrflds-bws-panel260.420.095.78
All Fields /wp-admin/profile-extra-fields.php260.420.066.64
Add New /wp-admin/profile-extra-field-add-new.php260.420.125.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_prflxtrflds_fields_meta
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/profile-extra-fields/includes/class-prflxtrflds-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/profile-extra-fields/bws_menu/product_list.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/profile-extra-fields/profile-extra-fields.php:5849
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/profile-extra-fields/bws_menu/class-bws-settings.php:1453
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/profile-extra-fields/profile-extra-fields.php on line 1697

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/profile-extra-fields-settings.php
    • > Network (severe)
    wp-admin/profile-extra-fields-settings.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/profile-extra-fields.php?page=prflxtrflds-bws-panel
    • > Network (severe)
    wp-admin/profile-extra-fields.php?page=prflxtrflds-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/profile-extra-fields.php
    • > Network (severe)
    wp-admin/profile-extra-fields.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/profile-extra-field-add-new.php
    • > Network (severe)
    wp-admin/profile-extra-field-add-new.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (Viewing user data via shortcode.), #2 (Field Edit Page.), #3 (Format setting for the date, time or datetime type fields.), #4 (Available values setting for the Radio button, Drop down list or Checkbox type fields.), #5 (Pattern setting for the Phone number type field.), #6 (Plugin Homepage with the list of created Extra Fields.), #7 (Viewing user information on the plugin page.), #8 (Additional fields on the user's profile page.), #9 (Datetimepicker displaying for the date, time or datetime type fields.), #10 (Shortcode settings page.), #11 (Adding Profile Extra Fields shortcode to your page or post.), #12 (Optional fields.), #13 (Car Rental fields.), #14 (Car Rental plugin with additional fields.), #15 (Additional Car Rental fields on the user profile page.)
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

profile-extra-fields/profile-extra-fields.php Passed 13 tests

This is the main PHP file of "Profile Extra Fields by BestWebSoft" version 1.2.8, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
114 characters long description:
Add extra fields to default WordPress user profile. The easiest way to create and manage additional custom values.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin36,262 lines of code in 51 files:
LanguageFilesBlank linesComment linesLines of code
PO File166,71512,50916,608
PHP97688779,557
CSS102272776,094
JavaScript102702333,834
SVG600169

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity57.17
▷ Minimum class complexity2.00
▷ Maximum class complexity210.00
Average method complexity6.35
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods57
▷ Static methods00.00%
▷ Public methods5189.47%
▷ Protected methods00.00%
▷ Private methods610.53%
Functions104
▷ Named functions9995.19%
▷ Anonymous functions54.81%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
76 PNG files occupy 4.69MB with 1.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/icons/plugins/bike-rental.png6.86KB2.68KB▼ 60.89%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
screenshot-1.png346.77KB143.11KB▼ 58.73%
bws_menu/images/close_banner.png0.44KB0.49KB0.00%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-bg_glass_75_e6e6e6_1x400.png0.15KB0.14KB▼ 6.62%