90% nav-menu-images

Code Review | Nav Menu Images

WordPress plugin Nav Menu Images scored90%from 54 tests.

About plugin

  • Plugin page: nav-menu-images
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 22, 2012
  • Latest release: Sep 11, 2016
  • Number of updates: 33
  • Update frequency: every 43.4 days
  • Top authors: dimadin (100%)

Code review

54 tests

User reviews

37 reviews

Install metrics

10,000+ active /144,014 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Nav Menu Images
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.54 ▼8.09
Dashboard /wp-admin3.39 ▲0.0444.48 ▼17.95
Posts /wp-admin/edit.php3.50 ▲0.1443.96 ▼7.68
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.60 ▼23.24
Media Library /wp-admin/upload.php3.31 ▲0.0839.04 ▲2.62

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Nav Menu Images: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.081.58 ▼0.1138.76 ▼9.29
Dashboard /wp-admin2,195 ▲155.63 ▼0.0296.32 ▼4.6543.24 ▼1.57
Posts /wp-admin/edit.php2,100 ▲31.96 ▼0.0533.63 ▼5.0235.21 ▲0.14
Add New Post /wp-admin/post-new.php1,529 ▲323.17 ▼0.53644.55 ▲34.4952.07 ▲2.83
Media Library /wp-admin/upload.php1,397 ▼34.22 ▼0.0298.46 ▼4.8442.89 ▼3.09

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

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 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
4 plugin tags: menu, image, media, nav menu

nav-menu-images/nav-menu-images.php 92% from 13 tests

"Nav Menu Images" version 3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin410 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3107435298
JavaScript22428112

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity16.00
▷ Minimum class complexity11.00
▷ Maximum class complexity20.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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