84% elu-hide-admin-menu

Code Review | ELU Hide Admin Menu

WordPress plugin ELU Hide Admin Menu scored84%from 54 tests.

About plugin

  • Plugin page: elu-hide-admin-menu
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.8
  • WordPress version: 6.3.1
  • First release: Oct 8, 2018
  • Latest release: Oct 11, 2018
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: elightup (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,688 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.12MB] [CPU: ▼8.04ms] Passed 4 tests

Server-side resources used by ELU Hide Admin Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.83 ▲3.57
Dashboard /wp-admin3.44 ▲0.1351.33 ▼3.18
Posts /wp-admin/edit.php3.55 ▲0.1951.68 ▲0.68
Add New Post /wp-admin/post-new.php6.02 ▲0.1391.15 ▼33.24
Media Library /wp-admin/upload.php3.36 ▲0.1337.57 ▲5.55
Admin Menu /wp-admin/admin.php?page=hide-admin-menu3.3836.23
Import & Export /wp-admin/admin.php?page=hide-admin-menu-imex3.3334.34
Admin Bar /wp-admin/admin.php?page=hide-admin-menu-bar3.3534.54

Server storage [IO: ▲0.04MB] [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: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for ELU Hide Admin Menu
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.69 ▲0.061.62 ▼0.0342.89 ▼1.94
Dashboard /wp-admin2,226 ▲465.64 ▼0.0284.82 ▼5.4939.06 ▼2.39
Posts /wp-admin/edit.php2,131 ▲312.03 ▲0.0139.79 ▼2.6035.35 ▼2.60
Add New Post /wp-admin/post-new.php1,551 ▲1623.45 ▲5.12670.65 ▲11.6356.99 ▼18.30
Media Library /wp-admin/upload.php1,428 ▲284.23 ▼0.0497.41 ▼8.1243.05 ▼8.45
Admin Menu /wp-admin/admin.php?page=hide-admin-menu1,6671.9538.5647.70
Import & Export /wp-admin/admin.php?page=hide-admin-menu-imex8342.1525.1732.12
Admin Bar /wp-admin/admin.php?page=hide-admin-menu-bar1,2391.9636.1436.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 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)
Everything seems fine, however this is by no means an exhaustive test

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
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Peace_Admin_Page' not found in wp-content/plugins/elu-hide-admin-menu/inc/imex.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/elu-hide-admin-menu/inc/admin-pages/admin-bar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/elu-hide-admin-menu/hide-admin-menu.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Peace_Admin_Page' not found in wp-content/plugins/elu-hide-admin-menu/inc/admin-menu.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_site_option() in wp-content/plugins/elu-hide-admin-menu/inc/admin-pages/admin-menu.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Peace_Admin_Page' not found in wp-content/plugins/elu-hide-admin-menu/inc/admin-bar.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/elu-hide-admin-menu/inc/admin-pages/imex.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/elu-hide-admin-menu/inc/functions.php:3

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

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
6 plugin tags: hide wordpress, admin menu, hide menu, admin bar, hide admin...

elu-hide-admin-menu/hide-admin-menu.php 92% from 13 tests

The principal PHP file in "ELU Hide Admin Menu" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("elu-hide-admin-menu.php" instead of "hide-admin-menu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected799 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP10174276748
CSS10027
JavaScript26224

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity17.00
▷ Minimum class complexity9.00
▷ Maximum class complexity34.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods32
▷ Static methods00.00%
▷ Public methods32100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
PNG images were not found in this plugin