10% menu-simple-role

Code Review | Menu Simple Role

WordPress plugin Menu Simple Role scored10%from 54 tests.

About plugin

  • Plugin page: menu-simple-role
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.6.0
  • WordPress version: 6.3.1
  • First release: Aug 22, 2016
  • Latest release: Aug 23, 2016
  • Number of updates: 21
  • Update frequency: every 0.1 days
  • Top authors: themca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,554 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/menu-simple-role/roles.php+33
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.79ms] Passed 4 tests

An overview of server-side resources used by Menu Simple Role
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.01 ▼5.03
Dashboard /wp-admin3.31 ▲0.0047.61 ▼7.92
Posts /wp-admin/edit.php3.36 ▲0.0052.95 ▼0.16
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.92 ▼14.04
Media Library /wp-admin/upload.php3.23 ▲0.0038.36 ▲3.05

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Menu Simple Role
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.46 ▼0.131.92 ▼0.2644.72 ▼0.87
Dashboard /wp-admin2,206 ▲184.89 ▼0.02115.46 ▼3.7942.64 ▼0.88
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0935.73 ▼1.8931.13 ▼6.60
Add New Post /wp-admin/post-new.php1,535 ▲2123.07 ▲5.59670.89 ▲1.1854.51 ▼2.41
Media Library /wp-admin/upload.php1,388 ▼04.20 ▼0.0298.50 ▼9.5843.55 ▼3.71

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/menu-simple-role/merhaba.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/menu-simple-role/roles.php on line 33

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

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: menu roles, wp nav menu role, wordpress kullanc mens

menu-simple-role/roles.php 92% from 13 tests

"Menu Simple Role" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("menu-simple-role.php" instead of "roles.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
Good job! No executable or dangerous file extensions detected18 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP27918

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin