I have done some troubleshooting and have found that if called directly the loginLockdown_install function does create the two database tables on my wamplite server.
The problem lies in the lines 311-315.
On my LAMP Production server this works as designed, $activatestr outputs
activate_login-lockdown/loginlockdown.php
On my WAMPlite Development server this does not work, $activatestr outputs
C:\Users\user\Documents\MySites\wordpress-site\login-lockdown.dev\wp-content\plugins\login-lockdown\loginlockdown.php
This happens because __FILE__ outputs
C:\Users\user\Documents\MySites\wordpress-site\login-lockdown.dev\wp-content\plugins\login-lockdown\loginlockdown.php
and
WP_PLUGIN_DIR . "/"
outputs
C:\Users\user\Documents\MySites\wordpress-site\login-lockdown.dev/wp-content/plugins/
I got this to work on the DEVELOPMENT server and the PRODUCTION server by replacing
if(!defined('WP_PLUGIN_DIR')){
define('WP_PLUGIN_DIR', ABSPATH . 'wp-content/plugins');
}
$activatestr = str_replace(WP_PLUGIN_DIR . "/", "activate_", __FILE__);
add_action($activatestr, 'loginLockdown_install');
with
register_activation_hook( __FILE__, 'loginLockdown_install' );
PS. Apparently register_activation_hook is only called on activation not on update. It is documented here.