• I'm not sure about lgp_temp_dir() - why wouldn't you just use Drupal's temp directory? That's how dd() does it. I guess you have lgp_get_temp_dir() to allow overrides, I think it would be easier to use a variable here so someone could define their lgp_temp_dir in settings.php instead of having to implement a function.
  • In lgp_get_message_context() can you use t() instead? That would make it translatable, and you're only using %s.
  • If you do keep using lgp_temp_dir_func, remove it in hook_uninstall().

Nothing major.