“Can’t use function return value in write context” error

The cause of the inconsitent behavior on the hosts has its roots in the different PHP versions. If you check the PHP manual for the empty() language construct, you can see in the changelog:

5.5.0 empty() now supports expressions, rather than only variables.

So it is only since PHP 5.5 that it is possible to use expressions inside of empty()) as is done in your plugin. In this case the usage of empty() is not needed and the code should work simply without it:

'meta' => array( 'class' => get_avatar( get_current_user_id(), 28 ) ? 'with-avatar' : '', ),