89% editor-menu-and-widget-access

Code Review | Editor Menu and Widget Access

WordPress plugin Editor Menu and Widget Access scored89%from 54 tests.

About plugin

  • Plugin page: editor-menu-and-w...
  • Plugin version: 3.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7
  • WordPress version: 6.3.1
  • First release: Jun 26, 2015
  • Latest release: Jun 2, 2021
  • Number of updates: 35
  • Update frequency: every 62.0 days
  • Top authors: GuyPrimavera (100%)

Code review

54 tests

User reviews

24 reviews

Install metrics

10,000+ active /77,636 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.16ms] Passed 4 tests

A check of server-side resources used by Editor Menu and Widget Access
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1439.69 ▲0.88
Dashboard /wp-admin3.44 ▲0.1049.58 ▼7.55
Posts /wp-admin/edit.php3.55 ▲0.2052.49 ▲4.18
Add New Post /wp-admin/post-new.php6.02 ▲0.1492.55 ▼11.61
Media Library /wp-admin/upload.php3.37 ▲0.1437.03 ▲1.63
Editor Access /wp-admin/themes.php?page=editorMenuWidgetAccess3.3331.74

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
emwa_role_string
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Editor Menu and Widget Access
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.27 ▼1.105.87 ▲4.3144.34 ▲1.78
Dashboard /wp-admin2,210 ▲194.84 ▼0.0596.22 ▼2.4338.56 ▼5.66
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0140.16 ▲6.8534.46 ▲0.64
Add New Post /wp-admin/post-new.php1,536 ▲1422.97 ▼0.08612.70 ▼69.4874.27 ▲20.97
Media Library /wp-admin/upload.php1,392 ▲44.31 ▲0.1292.74 ▼5.5541.57 ▼5.40
Editor Access /wp-admin/themes.php?page=editorMenuWidgetAccess1,1232.1624.5634.91

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • theysaidso_admin_options
    • emwa_role_string
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
Everything seems fine, however this is by no means an exhaustive test

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (21 tag instead of maximum 10)
Please take inspiration from this readme.txt

editor-menu-and-widget-access/editor-menu-widget-access.php 85% from 13 tests

The primary PHP file in "Editor Menu and Widget Access" version 3.1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("3.0.1" instead of "3.0.0")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("editor-menu-and-widget-access.php" instead of "editor-menu-widget-access.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
Good job! No executable or dangerous file extensions detected1,580 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP1316863686
PO File5222222586
CSS100142
LESS1306137
Markdown117029

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
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%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.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 images were found in this plugin