78% dynamic-user-directory

Code Review | Dynamic User Directory

WordPress plugin Dynamic User Directory scored78%from 54 tests.

About plugin

  • Plugin page: dynamic-user-dire...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2016
  • Latest release: Sep 19, 2023
  • Number of updates: 203
  • Update frequency: every 13.0 days
  • Top authors: Sarah_Dev (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

2,000+ active /63,401 total downloads

Benchmarks

Plugin footprint 83% 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: ▼13.63MB] [CPU: ▼3,046,707.89ms] Passed 4 tests

Server-side resources used by Dynamic User Directory
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /62.31 ▲58.8012,194,891.41 ▲12,194,846.93
Dashboard /wp-admin4.44 ▼57.8657.60 ▼12,186,864.11
Posts /wp-admin/edit.php4.55 ▲1.1574.27 ▲19.34
Add New Post /wp-admin/post-new.php7.02 ▲1.09101.56 ▼0.14
Media Library /wp-admin/upload.php4.36 ▲1.0947.75 ▲13.34
Dynamic User Directory /wp-admin/options-general.php?page=user_directory4.44110.29

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
dud_plugin_settings
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dynamic User Directory
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.25 ▲0.071.55 ▼0.1745.09 ▼0.51
Dashboard /wp-admin2,199 ▲225.63 ▼0.0296.11 ▼8.1340.02 ▼2.70
Posts /wp-admin/edit.php2,104 ▲71.99 ▼0.0139.56 ▲3.9736.78 ▼3.06
Add New Post /wp-admin/post-new.php1,531 ▼423.41 ▲5.35681.67 ▲45.5162.25 ▼7.05
Media Library /wp-admin/upload.php1,407 ▲74.17 ▼0.0694.46 ▼15.4043.04 ▼6.58
Dynamic User Directory /wp-admin/options-general.php?page=user_directory7,3424.36154.86138.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • dud_plugin_settings

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=user_directory
    • > Notice in wp-content/plugins/dynamic-user-directory/includes/admin.php+681
    Undefined index: ud_srch_style
    • > GET request to /wp-admin/options-general.php?page=user_directory
    • > Notice in wp-content/plugins/dynamic-user-directory/includes/admin.php+1283
    Undefined index: ud_target_window
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=user_directory
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=user_directory
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dynamic-user-directory/dynamic-user-directory.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dynamic-user-directory/includes/core.php:1834
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-user-directory/includes/admin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt is a good inspiration

dynamic-user-directory/dynamic-user-directory.php Passed 13 tests

"Dynamic User Directory" version 1.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
135 characters long description:
Creates an alphabetically sorted user directory that will format and display specified user meta data such as name, address, and email.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin9,398 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP41,0923966,391
JavaScript2395222,047
CSS417241960

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.90
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions65
▷ Named functions6498.46%
▷ Anonymous functions11.54%
Constants7
▷ Global constants7100.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
There were not PNG files found in your plugin