94% hide-option-for-ozhs-admin-drop-down-menu

Code Review | Hide Option for Ozh's Admin Drop Down Menu

WordPress plugin Hide Option for Ozh's Admin Drop Down Menu scored 94% from 54 tests.

About plugin

  • Plugin page: hide-option-for-o...
  • Plugin version: 0.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.2
  • WordPress version: 5.8.1
  • First release: Sep 1, 2012
  • Latest release: Dec 17, 2014
  • Number of updates: 9
  • Update frequency: every 93.5 days
  • Top authors: Greenweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 3,113 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.68ms] Passed 4 tests

This is a short check of server-side resources used by Hide Option for Ozh's Admin Drop Down Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1336.17 ▲14.34
Dashboard /wp-admin3.07 ▲0.0250.41 ▼0.37
Posts /wp-admin/edit.php3.13 ▲0.0148.88 ▼4.71
Add New Post /wp-admin/post-new.php5.43 ▼0.0095.63 ▼567.65
Media Library /wp-admin/upload.php3.02 ▲0.0238.27 ▲2.00

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Hide Option for Ozh's Admin Drop Down Menu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4215.98 ▲0.3313.64 ▲2.4845.93 ▼5.03
Dashboard /wp-admin2,967 ▲335.92 ▼0.07149.40 ▼25.32110.95 ▼10.19
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0167.37 ▼12.8291.94 ▼1.51
Add New Post /wp-admin/post-new.php1,615 ▼6821.45 ▲2.70305.67 ▼140.80108.60 ▼5.90
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.03159.68 ▲8.12127.33 ▲5.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hide-option-for-ozhs-admin-drop-down-menu/hide-ozh-dropdowns.php:31

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 errors were detected

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
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

hide-option-for-ozhs-admin-drop-down-menu/hide-ozh-dropdowns.php 92% from 13 tests

"Hide Option for Ozh's Admin Drop Down Menu" version 0.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hide-option-for-ozhs-admin-drop-down-menu.php" instead of "hide-ozh-dropdowns.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP133046

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin