78% ozh-admin-drop-down-menu

Code Review | Ozh' Admin Drop Down Menu

WordPress plugin Ozh' Admin Drop Down Menu scored78%from 54 tests.

About plugin

  • Plugin page: ozh-admin-drop-do...
  • Plugin version: 3.7.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.1
  • WordPress version: 6.3.1
  • First release: Sep 28, 2007
  • Latest release: Jun 9, 2020
  • Number of updates: 121
  • Update frequency: every 38.4 days
  • Top authors: ozh (100%)

Code review

54 tests

User reviews

73 reviews

Install metrics

5,000+ active /869,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.34ms] Passed 4 tests

A check of server-side resources used by Ozh' Admin Drop Down Menu
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.73 ▼5.40
Dashboard /wp-admin3.38 ▲0.0857.30 ▼0.34
Posts /wp-admin/edit.php3.43 ▲0.0856.39 ▲4.10
Add New Post /wp-admin/post-new.php5.96 ▲0.07100.40 ▼7.71
Media Library /wp-admin/upload.php3.31 ▲0.0841.65 ▲5.51
Admin Menu /wp-admin/options-general.php?page=ozh_admin_menu3.3336.97

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Ozh' Admin Drop Down Menu
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,080 ▲29414.40 ▲0.252.22 ▲0.1838.00 ▼0.08
Dashboard /wp-admin2,455 ▲2755.67 ▲0.0094.64 ▼2.1547.41 ▲4.86
Posts /wp-admin/edit.php2,369 ▲2692.04 ▲0.0139.32 ▲1.35103.06 ▲67.13
Add New Post /wp-admin/post-new.php1,924 ▲39822.54 ▼1.10602.50 ▼90.2175.37 ▲20.62
Media Library /wp-admin/upload.php1,660 ▲2604.34 ▲0.07104.80 ▼7.9848.33 ▲2.19
Admin Menu /wp-admin/options-general.php?page=ozh_admin_menu1,3201.8236.4985.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ozh-admin-drop-down-menu/inc/adminmenu.css.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ozh-admin-drop-down-menu/wp_ozh_adminmenu.php:135

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

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
9 plugin tags: drop down, ozh, dropdown, productivity, menu...

ozh-admin-drop-down-menu/wp_ozh_adminmenu.php 92% from 13 tests

This is the main PHP file of "Ozh' Admin Drop Down Menu" version 3.7.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 ("ozh-admin-drop-down-menu.php" instead of "wp_ozh_adminmenu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,013 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PO File188651,1842,131
PHP6182318808
JavaScript141754
Markdown110011
HTML1009

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions28
▷ Named functions2796.43%
▷ Anonymous functions13.57%
Constants1
▷ Global constants1100.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
54 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/images/image_add.png0.64KB0.70KB0.00%
inc/images/eye.png0.73KB0.79KB0.00%
inc/images/plugin_add.png0.67KB0.70KB0.00%
inc/images/cancel.png0.57KB0.62KB0.00%
inc/images/layout_edit.png0.70KB0.72KB0.00%