84% wp-menu-image

Code Review | WP Menu Image

WordPress plugin WP Menu Image scored84%from 54 tests.

About plugin

  • Plugin page: wp-menu-image
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2
  • WordPress version: 6.3.1
  • First release: Sep 30, 2020
  • Latest release: Apr 10, 2023
  • Number of updates: 10
  • Update frequency: every 93.4 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /4,629 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.23MB] [CPU: ▼14.09ms] Passed 4 tests

An overview of server-side resources used by WP Menu Image
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.63 ▼1.27
Dashboard /wp-admin3.07 ▼0.2426.81 ▼21.37
Posts /wp-admin/edit.php3.21 ▼0.1533.44 ▼15.60
Add New Post /wp-admin/post-new.php5.44 ▼0.4472.44 ▼8.26
Media Library /wp-admin/upload.php3.14 ▼0.0926.70 ▼11.11

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Menu Image
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲20015.02 ▲0.431.80 ▲0.0143.77 ▼0.85
Dashboard /wp-admin2,353 ▲1626.46 ▲1.53119.90 ▲14.3637.50 ▼3.41
Posts /wp-admin/edit.php2,256 ▲1673.40 ▲1.3651.46 ▲8.4734.87 ▼2.76
Add New Post /wp-admin/post-new.php1,521 ▼1217.69 ▼5.42676.42 ▲4.0836.39 ▼19.84
Media Library /wp-admin/upload.php1,395 ▲74.19 ▼0.0381.09 ▼18.3541.32 ▼1.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-menu-image/init/wmi-functions.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-menu-image/wp-menu-image.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

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

The principal PHP file in "WP Menu Image" v. 2.0 is loaded by WordPress automatically on each request
42 characters long description:
Can add custom images in menu in Wordpress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin191 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP2616104
JavaScript11148
SVG20227
CSS20112

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.19
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin