84% admin-menu-remover

Code Review | Admin menu remover

WordPress plugin Admin menu remover scored84%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: 6.3.1
  • 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

30+ active /2,186 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.78ms] Passed 4 tests

A check of server-side resources used by Admin menu remover
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0548.85 ▲7.09
Dashboard /wp-admin3.35 ▲0.0552.46 ▼0.57
Posts /wp-admin/edit.php3.40 ▲0.0552.90 ▲0.69
Add New Post /wp-admin/post-new.php5.93 ▲0.0589.15 ▼15.18
Media Library /wp-admin/upload.php3.28 ▲0.0538.69 ▲3.93
Admin menu remover /wp-admin/options-general.php?page=admin_menu_remover_settings_page3.2634.77

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Admin menu remover
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.37 ▼0.934.40 ▲2.7544.02 ▲2.55
Dashboard /wp-admin2,210 ▲225.82 ▼0.0298.78 ▼12.6240.18 ▼8.12
Posts /wp-admin/edit.php2,090 ▲42.02 ▲0.0239.76 ▲3.2734.62 ▼0.32
Add New Post /wp-admin/post-new.php1,517 ▼417.56 ▼5.60695.51 ▲15.2253.37 ▼4.10
Media Library /wp-admin/upload.php1,389 ▲44.30 ▼0.10107.63 ▲2.1843.89 ▼2.76
Admin menu remover /wp-admin/options-general.php?page=admin_menu_remover_settings_page1,0562.0625.5328.42

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 were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/admin-menu-remover/admin-menu-remover.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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 need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === admin-menu-remover === )
The official readme.txt might help

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

The main PHP file in "Admin menu remover" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 201 characters long)

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
Success! There were no dangerous files found in this plugin384 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11777384

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued 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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin