72% user-specific-content

Code Review | User Specific Content

WordPress plugin User Specific Content scored72%from 54 tests.

About plugin

  • Plugin page: user-specific-con...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.2-4.7.0
  • WordPress version: 6.3.1
  • First release: Apr 13, 2011
  • Latest release: Dec 11, 2016
  • Number of updates: 43
  • Update frequency: every 48.1 days
  • Top authors: bainternet (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

3,000+ active /93,748 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼10.85MB] [CPU: ▼2,205,030.41ms] Passed 4 tests

This is a short check of server-side resources used by User Specific Content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0534.36 ▼13.26
Dashboard /wp-admin3.57 ▼42.5950.02 ▼8,820,058.83
Posts /wp-admin/edit.php3.69 ▲0.2852.59 ▲4.30
Add New Post /wp-admin/post-new.php4.86 ▼1.0751.51 ▼49.02
Media Library /wp-admin/upload.php3.49 ▲0.2238.37 ▼0.51
User Specific Content /wp-admin/users.php?page=User_specific_content_panel3.4434.95

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
U_S_C
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by User Specific Content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.32 ▼0.061.94 ▲0.1141.61 ▼3.07
Dashboard /wp-admin2,199 ▲315.61 ▲0.0484.83 ▼3.0942.88 ▼0.35
Posts /wp-admin/edit.php2,104 ▲41.99 ▲0.0238.52 ▼0.4636.60 ▲2.05
Add New Post /wp-admin/post-new.php6,298 ▲4,77020.09 ▼2.83909.77 ▲239.0174.36 ▲9.82
Media Library /wp-admin/upload.php1,407 ▲134.16 ▼0.0997.83 ▼0.9744.16 ▲3.22
User Specific Content /wp-admin/users.php?page=User_specific_content_panel1,6392.5245.1260.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • U_S_C
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% 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
    • > GET request to /wp-admin/users.php?page=User_specific_content_panel
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/users.php?page=User_specific_content_panel
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=User_specific_content_panel
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > 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
  • 24 occurences, only the last one shown
    • > GET request to /wp-admin/users.php?page=User_specific_content_panel
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > 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 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/user-specific-content/User-Specific-Content.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'SimplePanel' not found in wp-content/plugins/user-specific-content/panel/User_specific_content_panel.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: user content, user specific content, content by role, content by user

user-specific-content/User-Specific-Content.php 92% from 13 tests

The main PHP file in "User Specific Content" ver. 1.0.6 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("user-specific-content.php" instead of "User-Specific-Content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,146 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP41516381,146

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity58.33
▷ Minimum class complexity15.00
▷ Maximum class complexity98.00
Average method complexity4.07
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods56
▷ Static methods00.00%
▷ Public methods56100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected