89% wp-user-profile-restriction

Code Review | WP User Profile Restriction

WordPress plugin WP User Profile Restriction scored89%from 54 tests.

About plugin

  • Plugin page: wp-user-profile-r...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.3-5.8.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2019
  • Latest release: Dec 23, 2021
  • Number of updates: 7
  • Update frequency: every 154.6 days
  • Top authors: shawon786 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

200+ active /1,987 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼12.38ms] Passed 4 tests

An overview of server-side resources used by WP User Profile Restriction
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.13 ▼6.74
Dashboard /wp-admin3.31 ▼0.0447.63 ▼17.54
Posts /wp-admin/edit.php3.36 ▲0.0042.54 ▼0.71
Add New Post /wp-admin/post-new.php5.90 ▲0.0078.23 ▼22.32
Media Library /wp-admin/upload.php3.24 ▲0.0033.40 ▼2.93

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP User Profile Restriction
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.051.59 ▼0.0245.32 ▼0.32
Dashboard /wp-admin2,192 ▲185.50 ▼0.3183.19 ▼14.7736.89 ▼10.86
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0434.78 ▼6.1131.76 ▼9.19
Add New Post /wp-admin/post-new.php1,528 ▼723.06 ▲5.07681.52 ▲12.8462.76 ▼10.92
Media Library /wp-admin/upload.php1,400 ▼34.24 ▲0.0495.34 ▼13.2342.28 ▼6.30

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

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

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: You can take inspiration from this readme.txt

wp-user-profile-restriction/wp-upr.php 92% from 13 tests

The principal PHP file in "WP User Profile Restriction" v. 1.0.5 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-user-profile-restriction.php" instead of "wp-upr.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP17911

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected