78% wp-menu-icons

Code Review | WP Menu Icons

WordPress plugin WP Menu Icons scored78%from 54 tests.

About plugin

  • Plugin page: wp-menu-icons
  • Plugin version: 3.1.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: May 10, 2018
  • Latest release: Nov 13, 2023
  • Number of updates: 98
  • Update frequency: every 20.5 days
  • Top authors: quadlayers (98.98%)beluserra (2.04%)

Code review

54 tests

User reviews

118 reviews

Install metrics

20,000+ active /397,595 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.73MB] [CPU: ▲3.45ms] Passed 4 tests

A check of server-side resources used by WP Menu Icons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.16 ▲0.6943.62 ▲3.42
Dashboard /wp-admin4.07 ▲0.7656.04 ▲7.73
Posts /wp-admin/edit.php4.14 ▲0.7854.47 ▲5.10
Add New Post /wp-admin/post-new.php6.64 ▲0.7587.27 ▼1.66
Media Library /wp-admin/upload.php3.95 ▲0.7243.26 ▲6.93
Welcome /wp-admin/admin.php?page=wp-menu-icons3.9742.55
Premium /wp-admin/admin.php?page=wp-menu-icons&tab=premium3.9742.62
Suggestions /wp-admin/admin.php?page=wp-menu-icons&tab=suggestions3.9743.48
Settings /wp-admin/admin.php?page=wp-menu-icons&tab=settings3.9743.09

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Menu Icons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,929 ▲18214.71 ▲0.371.64 ▼0.3640.81 ▼4.87
Dashboard /wp-admin2,337 ▲1605.63 ▼0.0289.30 ▼5.3840.79 ▼0.94
Posts /wp-admin/edit.php2,144 ▲441.96 ▲0.0240.97 ▲1.9536.70 ▲0.02
Add New Post /wp-admin/post-new.php1,560 ▲3423.28 ▲0.20682.07 ▲76.7568.59 ▲16.50
Media Library /wp-admin/upload.php1,435 ▲384.16 ▼0.02102.13 ▼1.8342.66 ▲0.65
Welcome /wp-admin/admin.php?page=wp-menu-icons1,21412.75243.5949.15
Premium /wp-admin/admin.php?page=wp-menu-icons&tab=premium1,22612.78131.0743.00
Suggestions /wp-admin/admin.php?page=wp-menu-icons&tab=suggestions1,98611.54127.7951.87
Settings /wp-admin/admin.php?page=wp-menu-icons&tab=settings1,25811.18127.9847.14

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-menu-icons/wp-menu-icons.php
  • 29× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginDataByFile' not found in wp-content/plugins/wp-menu-icons/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginByFile.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/wp-menu-icons/jetpack_vendor/quadlayers/wp-plugin-suggestions/src/view/suggestions.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/wp-menu-icons/lib/class-menu-item-custom-fields-walker.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WPMI\\Api\\Rest\\Endpoints\\Base' not found in wp-content/plugins/wp-menu-icons/lib/api/rest/endpoints/backend/class-base.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WPMI\\Api\\Rest\\Endpoints\\Backend\\Base' not found in wp-content/plugins/wp-menu-icons/lib/api/rest/endpoints/backend/navmenu/class-get.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WPMI\\Api\\Rest\\Endpoints\\Backend\\Base' not found in wp-content/plugins/wp-menu-icons/lib/api/rest/endpoints/backend/settings/class-post.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-menu-icons/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/templates/notice.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WPMI\\Entities\\Libraries\\Base' not found in wp-content/plugins/wp-menu-icons/lib/entities/libraries/class-elegant-icons.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\WPMI\\Entities\\Libraries\\Base' not found in wp-content/plugins/wp-menu-icons/lib/entities/libraries/class-dashicons.php:9
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActions' not found in wp-content/plugins/wp-menu-icons/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginBySlug.php on line 20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7 in wp-menu-icons/assets to your readme.txt
The official readme.txt is a good inspiration

wp-menu-icons/wp-menu-icons.php Passed 13 tests

Analyzing the main PHP file in "WP Menu Icons" version 3.1.8
29 characters long description:
Add icons to your menu items.

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
Good job! No executable or dangerous file extensions detected15,747 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
CSS1419385,965
SVG5034,747
PHP758891,7723,746
Markdown122700730
JSON100458
JavaScript61017101

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.96
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces21
Interfaces2
Traits3
Classes47
▷ Abstract classes48.51%
▷ Concrete classes4391.49%
▷ Final classes12.33%
Methods260
▷ Static methods8532.69%
▷ Public methods21883.85%
▷ Protected methods103.85%
▷ Private methods3212.31%
Functions16
▷ Named functions00.00%
▷ Anonymous functions16100.00%
Constants30
▷ Global constants30100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.13MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/backend/img/wp-menu-icons-fontello.png36.51KB37.25KB0.00%
assets/backend/img/logo.png9.28KB4.16KB▼ 55.19%
assets/backend/img/wp-menu-icons-2.png58.58KB62.32KB0.00%
assets/backend/img/wp-menu-icons-upload.png29.68KB29.32KB▼ 1.19%