How to tell if the user is an admin?

Yes, that’s good.

You can be a little safer using <?php if(current_user_can('manage_plugins') ); ?>