68% featured-users-wordpress-plugin

Code Review | Featured Users

WordPress plugin Featured Users scored68%from 54 tests.

About plugin

  • Plugin page: featured-users-wo...
  • Plugin version: 2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.1-5.0
  • WordPress version: 6.3.1
  • First release: Jun 5, 2012
  • Latest release: Jan 16, 2019
  • Number of updates: 15
  • Update frequency: every 161.1 days
  • Top authors: jeremyselph (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,205 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.81MB] [CPU: ▼35.71ms] Passed 4 tests

This is a short check of server-side resources used by Featured Users
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.05 ▲5.69
Dashboard /wp-admin3.14 ▼0.2023.49 ▼35.68
Posts /wp-admin/edit.php3.14 ▼0.2124.42 ▼23.20
Add New Post /wp-admin/post-new.php3.14 ▼2.7423.37 ▼71.65
Media Library /wp-admin/upload.php3.14 ▼0.0924.15 ▼12.30
Featured Users /wp-admin/options-general.php?page=rd-featured-users3.1425.25

Server storage [IO: ▲0.11MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Featured Users
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.231.73 ▲0.1448.33 ▲5.45
Dashboard /wp-admin2,199 ▲225.61 ▲0.0190.65 ▲3.8440.74 ▲0.81
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0233.85 ▼2.7537.38 ▲0.10
Add New Post /wp-admin/post-new.php1,529 ▼423.91 ▲0.86687.97 ▲1.6447.95 ▼6.80
Media Library /wp-admin/upload.php1,404 ▲44.23 ▲0.0493.02 ▲0.8739.28 ▼5.12
Featured Users /wp-admin/options-general.php?page=rd-featured-users1,4702.0123.5730.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/featured-users-wordpress-plugin/inc/settings.php+399
    Trying to access array offset on value of type bool
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_rd_featured_users_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rd-featured-users
    • > Notice in wp-content/plugins/featured-users-wordpress-plugin/inc/settings.php+167
    Trying to access array offset on value of type bool
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=rd-featured-users
    • > Warning in wp-content/plugins/featured-users-wordpress-plugin/inc/settings.php+173
    in_array() expects parameter 2 to be array, null given

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'rdFeaturedUsers' not found in wp-content/plugins/featured-users-wordpress-plugin/inc/settings.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'rdFeaturedUsers' not found in wp-content/plugins/featured-users-wordpress-plugin/inc/shortcode.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/featured-users-wordpress-plugin/inc/widget.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/featured-users-wordpress-plugin/js_featured_users.php:140

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention: You can look at the official readme.txt

featured-users-wordpress-plugin/js_featured_users.php 92% from 13 tests

The entry point to "Featured Users" version 2.1 is a PHP file that has certain tags in its header comment area
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 ("featured-users-wordpress-plugin.php" instead of "js_featured_users.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin607 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4273493542
Markdown119034
JavaScript1205227
CSS13144

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity17.20
▷ Minimum class complexity2.00
▷ Maximum class complexity51.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods2790.00%
▷ Protected methods00.00%
▷ Private methods310.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/star.png2.47KB1.54KB▼ 37.57%