66% wp-hamburger

Code Review | WP Hamburger

WordPress plugin WP Hamburger scored66%from 54 tests.

About plugin

  • Plugin page: wp-hamburger
  • Plugin version: 1.6.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Oct 9, 2020
  • Latest release: May 24, 2023
  • Number of updates: 18
  • Update frequency: every 53.2 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /4,225 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.25ms] Passed 4 tests

This is a short check of server-side resources used by WP Hamburger
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.31 ▲1.36
Dashboard /wp-admin3.33 ▲0.0349.48 ▼1.98
Posts /wp-admin/edit.php3.38 ▲0.0348.10 ▼3.49
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.24 ▼12.90
Media Library /wp-admin/upload.php3.25 ▲0.0237.20 ▲2.68
WP Hamburger /wp-admin/options-general.php?page=wp-hamburger3.4238.30

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
wpha_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Hamburger
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲17916.37 ▲1.9914.15 ▲12.3337.48 ▼7.84
Dashboard /wp-admin2,211 ▲235.84 ▲0.76105.04 ▲1.8942.56 ▲1.70
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0036.27 ▼4.9236.99 ▲1.91
Add New Post /wp-admin/post-new.php1,540 ▼123.39 ▲5.05657.73 ▼13.3651.03 ▼9.51
Media Library /wp-admin/upload.php1,399 ▲114.37 ▲0.14106.60 ▼0.6242.91 ▼7.08
WP Hamburger /wp-admin/options-general.php?page=wp-hamburger1,9106.6499.19113.13

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • wpha_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+323
    Undefined index: font-family
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+341
    Undefined index: background
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+362
    Undefined index: ham_background
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+365
    Undefined index: foreground
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+398
    Undefined index: menu-color
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+403
    Undefined index: menu-font-size
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+414
    Undefined index: menu-bullet-closed
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+415
    Undefined index: menu-bullet-closed-img
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+428
    Undefined index: menu-bullet-opened
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+429
    Undefined index: menu-bullet-opened-img
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+452
    Undefined index: sub-menu-color
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+457
    Undefined index: sub-menu-font-size
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+469
    Undefined index: sub-menu-bullet-closed
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+470
    Undefined index: sub-menu-bullet-closed-img
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Notice in wp-content/plugins/wp-hamburger/inc/wpha_settings.php+486
    Undefined index: css

SRP 0% from 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-hamburger/index.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-hamburger/inc/wpha_settings.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hamburger/inc/functions-inner.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-hamburger/inc/functions.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/wp-hamburger/inc/walker-class.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wp-hamburger 451 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wp-hamburger 472 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wp-hamburger 475 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wp-hamburger 508 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wp-hamburger 562 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'ham_background')" "TypeError: Cannot read properties of null (reading 'ham_background')\n at wpha_init_demo (/wp-content/plugins/wp-hamburger/js/admin-scripts.js?t=1697097523&ver=6.3.1:164:73)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-hamburger/js/admin-scripts.js?t=1697097523&ver=6.3.1:290:5)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=wp-hamburger
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'ham_background')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: sticky, menu, fontawesome, responsive, hamburger...

wp-hamburger/index.php 85% from 13 tests

Analyzing the main PHP file in "WP Hamburger" version 1.6.5
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-hamburger.php" instead of "index.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected11,422 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP6774501,303
CSS49314323
JavaScript623365250

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity12.50
▷ Minimum class complexity3.00
▷ Maximum class complexity22.00
Average method complexity6.75
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/butterfly.png0.66KB0.88KB0.00%
img/default_bg_img.png0.12KB0.08KB▼ 34.40%
img/icon.png0.96KB1.03KB0.00%
img/butterfly-b.png2.59KB1.22KB▼ 53.05%