This bit is wrong on the first line...
$branchlabel = '<em><i class="fa fa-linux"></i>' . 'penguin' . '</em>';
$branch url = "https://www.google.co.uk/search?q=penguin&safe=active";
$usermenu .= html_writer::tag('li', html_writer::link($branchurl, $branchlabel));
For the following reason.
When adding pure HTML which is basically all that is in that first line you only need to enclose the whole line within those single punctuation marks like so...
$branchlabel = '<em><i class="fa fa-linux"></i> penguin </em>';
And do the url as Gareth explained.