Fix widget template to only show link if the link text isn't empty.
Declare the global main plugin variable.
Correct typo in docblock and update whitespace.
Only search for a sidebar-specific template if sidebar id isn't empty. Accounts for calling the_widget().