10% vihv-menu

Code Review | Vihv Menu

WordPress plugin Vihv Menu scored 10% from 54 tests.

About plugin

  • Plugin page: vihv-menu
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.9.2
  • First release: Feb 26, 2013
  • Latest release: Jun 21, 2013
  • Number of updates: 23
  • Update frequency: every 6.1 days
  • Top authors: Vihv (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 5,874 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/vihv-menu/TVihvEditMenuWalker.php+11
    Declaration of TVihvEditMenuWalker::start_lvl(&$output) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)

Server metrics [RAM: ▼2.44MB] [CPU: ▼338.88ms] Passed 4 tests

This is a short check of server-side resources used by Vihv Menu
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.93 ▼1.584.97 ▼45.11
Dashboard /wp-admin1.95 ▼1.464.39 ▼27.98
Posts /wp-admin/edit.php1.95 ▼1.694.58 ▼31.78
Add New Post /wp-admin/post-new.php1.95 ▼5.024.43 ▼1,250.63
Media Library /wp-admin/upload.php1.95 ▼1.353.45 ▼21.33

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Vihv Menu: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲915.80 ▲0.186.00 ▲0.172.43 ▼0.50
Dashboard /wp-admin2,895 ▲346.17 ▼0.00117.30 ▼22.35156.83 ▼8.08
Posts /wp-admin/edit.php2,690 ▼13.24 ▲0.0163.56 ▼1.51144.99 ▲0.01
Add New Post /wp-admin/post-new.php1,752 ▲4121.09 ▲0.40442.72 ▼5.20163.74 ▲1.33
Media Library /wp-admin/upload.php1,698 ▼05.51 ▲0.00146.04 ▲2.11198.81 ▲6.04

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
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/vihv-menu/TVihvEditMenuWalker.php+11
    Declaration of TVihvEditMenuWalker::start_lvl(&$output) should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = NULL)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/vihv-menu/TVihvEditMenuWalker.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/vihv-menu/TVihvEditMenuWalker.php:4

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
  • Screenshots: Add a description for screenshot #0 in vihv-menu/assets to your readme.txt
Please take inspiration from this readme.txt

vihv-menu/vihv-menu.php Passed 13 tests

"Vihv Menu" version 2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
104 characters long description:
Menu icons, menu item css class, menu link XFN and open menu link in new window under Appearance->Menus.

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 plugin224 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22235224

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity11.00
▷ Minimum class complexity4.00
▷ Maximum class complexity18.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot.png73.13KB28.27KB▼ 61.35%