79% menu-image

Code Review | Menu Image, Icons made easy

WordPress plugin Menu Image, Icons made easy scored79%from 54 tests.

About plugin

  • Plugin page: menu-image
  • Plugin version: 3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 23, 2013
  • Latest release: Jul 17, 2023
  • Number of updates: 142
  • Update frequency: every 26.1 days
  • Top authors: zviryatko (61.97%)takanakui (38.73%)

Code review

54 tests

User reviews

120 reviews

Install metrics

100,000+ active /1,641,230 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲5.46MB] [CPU: ▲19.08ms] 75% from 4 tests

Analyzing server-side resources used by Menu Image, Icons made easy
Please take the time to fix the following items
  • Extra RAM: Extra memory usage should kept under 5MB (currently 5.46MB on /wp-admin/admin.php?page=freemius)
PageMemory (MB)CPU Time (ms)
Home /9.29 ▲5.8362.93 ▲17.64
Dashboard /wp-admin9.31 ▲5.9775.72 ▲18.59
Posts /wp-admin/edit.php9.31 ▲5.9569.63 ▲26.13
Add New Post /wp-admin/post-new.php10.00 ▲4.11105.33 ▲13.95
Media Library /wp-admin/upload.php9.31 ▲6.0871.55 ▲35.62
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius9.3155.53

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 195 new files
Database: no new tables, 9 new options
New WordPress options
fs_accounts
widget_recent-comments
db_upgraded
fs_debug_mode
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
fs_active_plugins
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Menu Image, Icons made easy
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲8914.25 ▲0.041.52 ▼0.1330.79 ▼10.24
Dashboard /wp-admin2,231 ▲515.64 ▼0.0381.66 ▼5.9841.87 ▼0.05
Posts /wp-admin/edit.php2,134 ▲341.98 ▲0.0340.31 ▲6.2837.54 ▲2.91
Add New Post /wp-admin/post-new.php1,544 ▲1622.93 ▼0.29673.24 ▼50.4655.50 ▼2.80
Media Library /wp-admin/upload.php1,436 ▲394.20 ▼0.0197.36 ▼6.7748.18 ▲4.56
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0981.6624.4327.46

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/menu-image/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • Zombie WordPress options were found after uninstall: 9 options
    • db_upgraded
    • fs_debug_mode
    • fs_accounts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • fs_active_plugins

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
5 plugin tags: menu, icons, navigation, nav menu, image

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

The primary PHP file in "Menu Image, Icons made easy" version 3.10 is used by WordPress to initiate all plugin functionality
70 characters long description:
Improve your navigation menu items with images, logos, icons, buttons.

Code Analysis 97% from 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 plugin35,707 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP1188,08317,51534,467
CSS1573549
JavaScript412188546
PO File35052145

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity94.14
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.59
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes49
▷ Abstract classes24.08%
▷ Concrete classes4795.92%
▷ Final classes00.00%
Methods1,300
▷ Static methods19715.15%
▷ Public methods90969.92%
▷ Protected methods191.46%
▷ Private methods37228.62%
Functions98
▷ Named functions98100.00%
▷ Anonymous functions00.00%
Constants149
▷ Global constants10268.46%
▷ Class constants4731.54%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/assets/img/menu-image-60.png6.92KB2.74KB▼ 60.50%
includes/assets/img/pro-badge-2.png5.19KB2.29KB▼ 55.86%
includes/assets/img/pro-button-2.png3.46KB1.72KB▼ 50.23%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
includes/assets/img/pro-badge-1.png5.03KB2.20KB▼ 56.39%