Singleton plugin activation; create database

There is an error here. You’ve not declared _register_hooks() method.
And I instantiated the class like below-

global $p;

if(empty($p)){
    $p = plugin::getInstance();
    $p->activate();
}

And it worked. For your case that has not worked cause WordPress uses a variable with name $plugin in its life cycle. And your code checks it’s empty or not. Obviously it’s not gonna be empty. So your $plugin = plugin::getInstance(); never executed. For using this singleton pattern your better declare the variable $plugin with a different name. Like I declared it as $p here. Better you prefix with something unique. Hope that suggestion helps you.