90% content-visibility-user-role

Code Review | Content Visibility User Role

WordPress plugin Content Visibility User Role scored90%from 54 tests.

About plugin

  • Plugin page: content-visibilit...
  • Plugin version: 0.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2021
  • Latest release: Feb 9, 2023
  • Number of updates: 7
  • Update frequency: every 102.1 days
  • Top authors: iamfriendly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,117 total downloads

Benchmarks

Plugin footprint 83% 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.02MB] [CPU: ▼5.41ms] Passed 4 tests

A check of server-side resources used by Content Visibility User Role
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.33 ▼2.88
Dashboard /wp-admin3.32 ▲0.0243.10 ▼10.66
Posts /wp-admin/edit.php3.38 ▲0.0244.81 ▼0.85
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.68 ▼7.24
Media Library /wp-admin/upload.php3.25 ▲0.0235.69 ▲1.60

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Content Visibility User Role
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.25 ▼1.014.14 ▲2.0141.74 ▼2.21
Dashboard /wp-admin2,209 ▲244.85 ▼0.05103.34 ▼2.3939.25 ▼8.17
Posts /wp-admin/edit.php2,089 ▼02.07 ▲0.0840.61 ▲6.7835.12 ▼3.46
Add New Post /wp-admin/post-new.php1,533 ▲1922.95 ▲5.27615.93 ▼83.1748.28 ▼7.91
Media Library /wp-admin/upload.php1,391 ▼04.20 ▼0.0297.77 ▼9.6642.94 ▼4.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
8 plugin tags: role, users, block, roles, content...

content-visibility-user-role/content-visibility-user-role.php Passed 13 tests

"Content Visibility User Role" version 0.1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
101 characters long description:
[Content Visibility Add-On] Determine which user role(s) can see the content blocks of your choosing.

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
No dangerous file extensions were detected399 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript198131311
PHP3345381
CSS2527

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
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
Namespaces1
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%
Functions3
▷ Named functions3100.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
There were not PNG files found in your plugin