78% fancy-user-listing

Code Review | Fancy User List

WordPress plugin Fancy User List scored78%from 54 tests.

About plugin

  • Plugin page: fancy-user-listing
  • Plugin version: 3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 6.3.1
  • First release: Apr 7, 2016
  • Latest release: May 22, 2020
  • Number of updates: 13
  • Update frequency: every 115.8 days
  • Top authors: GeroNikolov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,568 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.51ms] Passed 4 tests

This is a short check of server-side resources used by Fancy User List
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1146.03 ▲2.26
Dashboard /wp-admin3.40 ▲0.0648.63 ▼18.68
Posts /wp-admin/edit.php3.45 ▲0.1049.32 ▼2.75
Add New Post /wp-admin/post-new.php6.01 ▲0.1290.28 ▼2.87
Media Library /wp-admin/upload.php3.33 ▲0.1038.13 ▲2.91
Add new list /wp-admin/post-new.php?post_type=fancy_user_list3.3442.92
Lists /wp-admin/edit.php?post_type=fancy_user_list3.3742.94

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Fancy User List
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,942 ▲17113.66 ▼0.726.32 ▲4.1343.19 ▼1.24
Dashboard /wp-admin2,237 ▲484.87 ▼0.02106.88 ▼19.6240.31 ▼1.49
Posts /wp-admin/edit.php2,123 ▲342.03 ▼0.0137.49 ▲2.9634.50 ▲0.68
Add New Post /wp-admin/post-new.php1,541 ▲2723.27 ▲5.67643.98 ▼57.1857.49 ▼23.38
Media Library /wp-admin/upload.php1,413 ▲284.23 ▲0.0496.64 ▼4.3541.65 ▼6.73
Add new list /wp-admin/post-new.php?post_type=fancy_user_list1,7292.5751.0055.93
Lists /wp-admin/edit.php?post_type=fancy_user_list1,0842.0130.7829.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+168
    Undefined index: users_quantity
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+208
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+171
    Undefined index: users_shape
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+175
    Undefined index: users_avatar
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+179
    Undefined index: users_popup
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+183
    Undefined index: users_bio
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+187
    Undefined index: users_posts_num
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+191
    Undefined index: users_posts_reveal
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+194
    Undefined index: listing_order
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+200
    Undefined index: listing_order_type
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+204
    Undefined index: page_title
    • > GET request to /wp-admin/post-new.php?post_type=fancy_user_list
    • > Notice in wp-content/plugins/fancy-user-listing/fancy-user-list.php+208
    Undefined index: custom_users_listing

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/fancy-user-listing/fancy-user-list.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (13 tag instead of maximum 10)
  • Plugin Name: You should set the name of your plugin on the first line ( === fancy-user-listing === )
The official readme.txt might help

fancy-user-listing/fancy-user-list.php 92% from 13 tests

"Fancy User List" version 3.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("fancy-user-listing.php" instead of "fancy-user-list.php")

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
Good job! No executable or dangerous file extensions detected998 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP16539468
CSS2837408
JavaScript2143122

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity70.00
▷ Minimum class complexity70.00
▷ Maximum class complexity70.00
Average method complexity5.93
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/close-white-ex.png8.47KB3.16KB▼ 62.65%
assets/images/dead.png21.02KB8.92KB▼ 57.56%