94% admin-menu-remover

Code Review | Admin menu remover

WordPress plugin Admin menu remover scored 94% from 54 tests.

About plugin

  • Plugin page: admin-menu-remover
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4
  • WordPress version: 5.9.2
  • First release: Oct 16, 2015
  • Latest release: Nov 21, 2015
  • Number of updates: 8
  • Update frequency: every 4.6 days
  • Top authors: lepileppanen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,955 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼291.90ms] Passed 4 tests

Analyzing server-side resources used by Admin menu remover
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0553.70 ▲3.16
Dashboard /wp-admin3.46 ▲0.0534.15 ▲1.88
Posts /wp-admin/edit.php3.69 ▲0.0540.11 ▲3.74
Add New Post /wp-admin/post-new.php6.93 ▼0.0495.20 ▼1,173.14
Media Library /wp-admin/upload.php3.34 ▲0.0525.87 ▲0.52
Admin menu remover /wp-admin/options-general.php?page=admin_menu_remover_settings_page3.3323.12

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Admin menu remover
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲2616.19 ▲0.615.83 ▼0.622.40 ▲0.38
Dashboard /wp-admin2,897 ▲366.12 ▼0.14125.27 ▼13.33165.11 ▲4.48
Posts /wp-admin/edit.php2,693 ▲23.23 ▼0.0165.40 ▲1.79142.99 ▲1.01
Add New Post /wp-admin/post-new.php1,755 ▲321.08 ▼0.72430.81 ▼17.75164.13 ▲13.22
Media Library /wp-admin/upload.php1,703 ▲55.44 ▼0.03140.13 ▼2.85189.77 ▲1.62
Admin menu remover /wp-admin/options-general.php?page=admin_menu_remover_settings_page1,3722.3653.66112.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/admin-menu-remover/admin-menu-remover.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === admin-menu-remover === )
The official readme.txt is a good inspiration

admin-menu-remover/admin-menu-remover.php 92% from 13 tests

The primary PHP file in "Admin menu remover" version 1.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 201 characters long)

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
No dangerous file extensions were detected384 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11777384

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions8
▷ Named functions8100.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
There were not PNG files found in your plugin