94% menu-access-for-editors

Code Review | Allow Menus to be Maintained by Editors

WordPress plugin Allow Menus to be Maintained by Editors scored 94% from 54 tests.

About plugin

  • Plugin page: menu-access-for-e...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 5.9.2
  • First release: Oct 30, 2019
  • Latest release: Feb 3, 2021
  • Number of updates: 14
  • Update frequency: every 34.9 days
  • Top authors: wppluginpros (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 382 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Allow Menus to be Maintained by Editors
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0253.52 ▲6.22
Dashboard /wp-admin3.44 ▲0.0336.08 ▲2.60
Posts /wp-admin/edit.php3.67 ▲0.0337.79 ▼0.59
Add New Post /wp-admin/post-new.php6.91 ▼0.0697.03 ▼1,198.41
Media Library /wp-admin/upload.php3.32 ▲0.0224.67 ▼7.50

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 1 new option
New WordPress options
ds_menu_for_editors

Browser metrics Passed 4 tests

This is an overview of browser requirements for Allow Menus to be Maintained by Editors
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.96 ▲0.305.82 ▲0.402.32 ▼0.18
Dashboard /wp-admin2,895 ▲346.02 ▼0.16116.67 ▼16.21153.76 ▼5.94
Posts /wp-admin/edit.php2,691 ▲193.24 ▼0.0263.76 ▼1.35138.99 ▲2.21
Add New Post /wp-admin/post-new.php1,711 ▼620.75 ▼0.99428.03 ▼12.07164.19 ▲3.25
Media Library /wp-admin/upload.php1,698 ▼05.52 ▲0.04144.69 ▼5.44188.88 ▲1.68

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/menu-access-for-editors/ds-menu-for-editors.php
    • > /wp-content/plugins/menu-access-for-editors/class-ds-menu-for-editors.php

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: access, role, admin, dashboard, menu...

menu-access-for-editors/ds-menu-for-editors.php 92% from 13 tests

The entry point to "Allow Menus to be Maintained by Editors" version 1.0.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("menu-access-for-editors.php" instead of "ds-menu-for-editors.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected100 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP25987100

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected