An "enable" separate from the plugin enable is redundant

Also, "empty($apikey)" will test for both '' and NULL with one test.
(also for the number zero, so you do need to be careful.)