90% pbp-restricted-menu-widget-by-role

Code Review | PBP Restricted Menu-Widget by role

WordPress plugin PBP Restricted Menu-Widget by role scored90%from 54 tests.

About plugin

  • Plugin page: pbp-restricted-me...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.2
  • WordPress version: 6.3.1
  • First release: Sep 16, 2014
  • Latest release: Apr 25, 2015
  • Number of updates: 8
  • Update frequency: every 27.8 days
  • Top authors: projoktibangla (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,959 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.63ms] Passed 4 tests

A check of server-side resources used by PBP Restricted Menu-Widget by role
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1044.18 ▲2.36
Dashboard /wp-admin3.43 ▲0.0454.79 ▼9.24
Posts /wp-admin/edit.php3.54 ▲0.1461.17 ▲6.05
Add New Post /wp-admin/post-new.php6.01 ▲0.0889.30 ▼21.70
Media Library /wp-admin/upload.php3.35 ▲0.0844.28 ▲9.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

PBP Restricted Menu-Widget by role: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.71 ▲0.331.71 ▼0.0742.98 ▲1.47
Dashboard /wp-admin2,198 ▲185.59 ▼0.0890.81 ▲2.7239.24 ▲2.00
Posts /wp-admin/edit.php2,100 ▼01.98 ▲0.0440.29 ▲2.1537.79 ▲1.22
Add New Post /wp-admin/post-new.php1,528 ▲223.00 ▼0.13683.87 ▼7.6556.04 ▲4.50
Media Library /wp-admin/upload.php1,397 ▼34.20 ▼0.04102.01 ▼14.4246.43 ▼3.12

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: restricted, logged in, widget, logged out user, restriction...

pbp-restricted-menu-widget-by-role/res-menu-wid.php 92% from 13 tests

The entry point to "PBP Restricted Menu-Widget by role" version 1.1.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: The principal plugin file should be the same as the plugin slug ("pbp-restricted-menu-widget-by-role.php" instead of "res-menu-wid.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected363 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2121177363

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity17.33
▷ Minimum class complexity14.00
▷ Maximum class complexity20.00
Average method complexity6.44
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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
No PNG images were found in this plugin