72% vd-my-header-footer

Code Review | My Header Footer

WordPress plugin My Header Footer scored 72% from 54 tests.

About plugin

  • Plugin page: vd-my-header-footer
  • Plugin version: 1.27
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1
  • WordPress version: 6.3.1
  • First release: Jun 14, 2020
  • Latest release: Nov 4, 2022
  • Number of updates: 86
  • Update frequency: every 10.5 days
  • Top authors: visualdesigner (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 6,982 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
Install script ran successfully

Server metrics [RAM: ▲0.63MB] [CPU: ▲3.28ms] Passed 4 tests

Server-side resources used by My Header Footer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6850.55 ▲8.03
Dashboard /wp-admin3.94 ▲0.6357.72 ▲7.45
Posts /wp-admin/edit.php3.99 ▲0.6355.08 ▲4.76
Add New Post /wp-admin/post-new.php6.53 ▲0.6593.32 ▼6.83
Media Library /wp-admin/upload.php3.86 ▲0.6345.29 ▲7.75
Templates /wp-admin/edit.php?post_type=vd_posts3.9553.10
Build a Theme /wp-admin/admin.php?page=visual-designer-tb3.8944.69
MHF Setup Wizard /wp-admin/admin.php?page=visual-designer-mhf-setup4.0048.66
MHF Settings /wp-admin/admin.php?page=visual-designer-mhf3.8846.34

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 91 new files
Database: no new tables, 15 new options
New WordPress options
vd_tmpl_header
theysaidso_admin_options
can_compress_scripts
VD_CACHE_TIME
VD_NOTIF_MHF_REMINDER
db_upgraded
widget_theysaidso_widget
widget_recent-posts
VD_MHF_RUNS
VD_MHF_NAG_2_DISMISS_TIME
...

Browser metrics Passed 4 tests

My Header Footer: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,353 ▲61815.67 ▲1.6745.88 ▲44.1147.46 ▼2.95
Dashboard /wp-admin2,296 ▲1085.89 ▲1.00100.07 ▼13.8483.93 ▲41.35
Posts /wp-admin/edit.php2,137 ▲482.01 ▼0.0033.72 ▼3.6334.22 ▲0.30
Add New Post /wp-admin/post-new.php1,571 ▲3718.36 ▼4.82661.21 ▲31.7961.57 ▼8.42
Media Library /wp-admin/upload.php1,430 ▲424.23 ▼0.0198.70 ▼7.7689.91 ▲43.05
Templates /wp-admin/edit.php?post_type=vd_posts1,8112.0136.1032.58
Build a Theme /wp-admin/admin.php?page=visual-designer-tb1,3823.0048.8599.66
MHF Setup Wizard /wp-admin/admin.php?page=visual-designer-mhf-setup3,51911.04317.27141.84
MHF Settings /wp-admin/admin.php?page=visual-designer-mhf1,2353.1845.2195.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 15 options in the database
    • db_upgraded
    • vd_tmpl_footer
    • VD_MHF_RUNS
    • VD_CACHE_TIME
    • VD_MHF_ACTIVATE_TIME
    • vd_tmpl_header
    • widget_theysaidso_widget
    • VD_MHF_NAG_2_DISMISS_TIME
    • VD_MHF_NAG_1_DISMISS_TIME
    • theysaidso_admin_options
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=visual-designer-mhf-setup
    • > Notice in wp-content/plugins/vd-my-header-footer/lib/vd_editor.php+779
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/vd-my-header-footer/includes/partials/vd-mhf-pro-page.php
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function path_join() in wp-content/plugins/vd-my-header-footer/includes/partials/vd-theme-features-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/vd-my-header-footer/includes/partials/vd-notification.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/vd-my-header-footer/includes/partials/vd-notif-support.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function path_join() in wp-content/plugins/vd-my-header-footer/includes/partials/vd-setup-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/vd-my-header-footer/includes/partials/mhf-header.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/vd-my-header-footer/includes/partials/vd-notif-2.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vd-my-header-footer/includes/addon.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function path_join() in wp-content/plugins/vd-my-header-footer/includes/partials/vd-settings-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function path_join() in wp-content/plugins/vd-my-header-footer/lib/vd_editor_admin.php:27
    • > PHP Warning
      Use of undefined constant VD_ENVIRONMENT - assumed 'VD_ENVIRONMENT' (this will throw an Error in a future version of PHP) in wp-content/plugins/vd-my-header-footer/lib/vd_editor.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

vd-my-header-footer/vd_my_header_footer.php 85% from 13 tests

This is the main PHP file of "My Header Footer" version 1.27, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("vd-my-header-footer.php" instead of "vd_my_header_footer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected57,264 lines of code in 73 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript196,1684,15226,984
CSS9462,54020,628
HTML151265,080
PHP227827014,451
SVG803121

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity50.62
▷ Minimum class complexity1.00
▷ Maximum class complexity154.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods137
▷ Static methods12188.32%
▷ Public methods12389.78%
▷ Protected methods00.00%
▷ Private methods1410.22%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants76
▷ Global constants2836.84%
▷ Class constants4863.16%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/img/logo.png29.87KB9.35KB▼ 68.70%
lib/img/logo.png39.81KB21.37KB▼ 46.33%
lib/img/logo_inverted.png42.09KB21.44KB▼ 49.07%
lib/img/tb-icon.png3.78KB3.61KB▼ 4.49%
includes/img/mhf-logo.PNG50.25KB16.96KB▼ 66.25%