55% user-panel-lite

Code Review | User Panel Lite

WordPress plugin User Panel Lite scored55%from 54 tests.

About plugin

  • Plugin page: user-panel-lite
  • Plugin version: 1.0.4
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.6
  • WordPress version: 6.3.1
  • First release: Jul 19, 2018
  • Latest release: Jul 19, 2018
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: filteraction (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /554 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.80MB] [CPU: ▼34.00ms] Passed 4 tests

Analyzing server-side resources used by User Panel Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0646.39 ▼0.56
Dashboard /wp-admin3.14 ▼0.1628.14 ▼30.95
Posts /wp-admin/edit.php3.14 ▼0.2127.41 ▼24.23
Add New Post /wp-admin/post-new.php3.14 ▼2.7427.55 ▼69.24
Media Library /wp-admin/upload.php3.14 ▼0.0923.93 ▼11.57
Assign Job /wp-admin/edit.php?post_type=job3.1532.00
User Panel Lite /wp-admin/admin.php?page=upl3.1421.69
Options /wp-admin/admin.php?page=upl-option3.1424.18
Settings /wp-admin/admin.php?page=upl-settings3.1436.45
User Details /wp-admin/admin.php?page=user-details3.1423.66

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

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

Browser metrics Passed 4 tests

Checking browser requirements for User Panel Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,960 ▲19914.82 ▲0.262.07 ▲0.2041.90 ▼2.44
Dashboard /wp-admin2,363 ▲1836.33 ▲0.66116.36 ▲13.1239.36 ▼5.38
Posts /wp-admin/edit.php2,295 ▲1953.33 ▲1.3748.74 ▲11.3630.31 ▼5.23
Add New Post /wp-admin/post-new.php1,554 ▲2823.58 ▲0.68643.85 ▼62.9437.24 ▼22.34
Media Library /wp-admin/upload.php1,434 ▲344.15 ▼0.0678.27 ▼32.6242.96 ▼2.77
Assign Job /wp-admin/edit.php?post_type=job1,3033.3746.2328.87
User Panel Lite /wp-admin/admin.php?page=upl1,4643.4346.88187.37
Options /wp-admin/admin.php?page=upl-option1,0703.1136.4426.07
Settings /wp-admin/admin.php?page=upl-settings1,2423.3744.5649.50
User Details /wp-admin/admin.php?page=user-details1,2283.4043.0099.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=user-details
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/admin.php?page=user-details
    • > Notice in wp-content/plugins/user-panel-lite/inc/view-user.php+2
    Undefined index: user_id
    • > GET request to /wp-admin/admin.php?page=user-details
    • > Notice in wp-content/plugins/user-panel-lite/inc/view-user.php+28
    Trying to get property 'display_name' of non-object
    • > GET request to /wp-admin/admin.php?page=user-details
    • > Notice in wp-content/plugins/user-panel-lite/inc/view-user.php+33
    Trying to get property 'user_email' of non-object
    • > GET request to /wp-admin/admin.php?page=user-details
    • > Notice in wp-content/plugins/user-panel-lite/inc/view-user.php+119
    Trying to access array offset on value of type bool

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 fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/user-panel-lite/index.php
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-panel-lite/admin-settings/option-fields.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-panel-lite/admin-settings/option-fields.php:4
    • > PHP Notice
      Undefined index: user_id in wp-content/plugins/user-panel-lite/inc/view-user.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/user-panel-lite/inc/upl.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_user_by() in wp-content/plugins/user-panel-lite/inc/view-user.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=upl
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=upl 560:14 Uncaught TypeError: $ is not a function
    • > GET request to /wp-admin/admin.php?page=upl
    • > Network (severe)
    wp-content/plugins/user-panel-lite/fonts/glyphicons-halflings-regular.woff2 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=upl
    • > Network (severe)
    wp-content/plugins/user-panel-lite/fonts/glyphicons-halflings-regular.woff - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=upl
    • > Network (severe)
    wp-content/plugins/user-panel-lite/fonts/glyphicons-halflings-regular.ttf - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: You can look at the official readme.txt

user-panel-lite/user-panel.php 69% from 13 tests

"User Panel Lite" version 1.0.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 161 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("user-panel-lite.php" instead of "user-panel.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,677 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP792921,319
JavaScript4114206
CSS5018152

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity21.00
▷ Minimum class complexity18.00
▷ Maximum class complexity26.00
Average method complexity3.31
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods00.00%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.82MB with 0.51MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/background.png750.09KB342.06KB▼ 54.40%
img/admin.png41.60KB12.78KB▼ 69.28%
img/pdf-thumb.png46.76KB17.66KB▼ 62.23%