10% user-profile-fields

Code Review | User Profile Fields

WordPress plugin User Profile Fields scored10%from 54 tests.

About plugin

  • Plugin page: user-profile-fields
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 5, 2014
  • Latest release: Feb 5, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: johnl1479 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /2,001 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/user-profile-fields/user-profile-fields.php+47
    array_merge(): Expected parameter 2 to be an array, bool given

Server metrics [RAM: ▼1.91MB] [CPU: ▼50.12ms] Passed 4 tests

Server-side resources used by User Profile Fields
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.395.32 ▼33.58
Dashboard /wp-admin2.09 ▼1.216.27 ▼42.52
Posts /wp-admin/edit.php2.09 ▼1.267.13 ▼42.88
Add New Post /wp-admin/post-new.php2.09 ▼3.797.69 ▼81.51
Media Library /wp-admin/upload.php2.09 ▼1.136.28 ▼30.43
Profile Fields /wp-admin/users.php?page=user-profile-fields/user-profile-fields.php2.106.64

Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • Illegal file modification found: 1 file (4.00KB) outside of "wp-content/plugins/user-profile-fields/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by User Profile Fields
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲8313.27 ▼1.131.82 ▲0.0339.78 ▼4.36
Dashboard /wp-admin2,222 ▲165.79 ▲0.72102.07 ▼9.4037.93 ▼1.36
Posts /wp-admin/edit.php2,104 ▲42.04 ▼0.0140.28 ▲3.1435.19 ▼0.22
Add New Post /wp-admin/post-new.php1,548 ▲323.53 ▲0.52660.29 ▼10.9258.91 ▲1.16
Media Library /wp-admin/upload.php1,398 ▲14.20 ▼0.0095.64 ▼11.5942.43 ▼0.23
Profile Fields /wp-admin/users.php?page=user-profile-fields/user-profile-fields.php8782.1428.3230.19

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
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/user-profile-fields/user-profile-fields.php+47
    array_merge(): Expected parameter 2 to be an array, bool given
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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
These errors were triggered by the plugin
    • > GET request to /wp-admin/users.php?page=user-profile-fields/user-profile-fields.php
    • > Warning in wp-content/plugins/user-profile-fields/user-profile-fields.php+47
    array_merge(): Expected parameter 2 to be an array, bool given
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=user-profile-fields/user-profile-fields.php
    • > Notice in wp-content/plugins/user-profile-fields/user-profile-fields.php+164
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-profile-fields/user-profile-fields.php:47

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === user-profile-fields === )
  • Screenshots: Screenshot #1 (Configuration screen. You can disable almost all fields on the profile screen.) image missing
Please take inspiration from this readme.txt

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

The primary PHP file in "User Profile Fields" version 0.1 is used by WordPress to initiate all plugin functionality
101 characters long description:
Allows you to removes the AIM, YIM, Jabber, Website, and Biography fields from the user profile page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected124 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13126124

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods981.82%
▷ Protected methods00.00%
▷ Private methods218.18%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin