I have been renaming all my plugins for the past 10 years and I rarely encounter any error. It's like renaming the /wordpress directory and it still works. That's why I didn't suspect. Don't worry bro, we're a bunch of dummies out here

. Now, let me try retaining the directory name.
As most of developers are using
Code:
if ( is_plugin_active( 'plugin-folder/plugin-file.php' ) ) { // check if plugin is installed and active
// do the code
}
or
if ( !is_plugin_active( 'plugin-folder/plugin-file.php' ) ) { // check if plugin is not active
// do the code
}
or
(!in_array('plugin-folder/plugin-file.php', apply_filters('active_plugins', get_option('active_plugins')))) { // check if plugin is not active
// do the code
}
or
(in_array('plugin-folder/plugin-file.php', apply_filters('active_plugins', get_option('active_plugins')))) { // check if plugin is installed and active
// do the code
}
a better and more professional approach to this would be:
Code:
$all_plugins = apply_filters('active_plugins', get_option('active_plugins'));
if (stripos(implode($all_plugins), 'plugin.php')) { // check if plugin installed and active
// do the code
}
This way is avoided the error in case of folder rename.
Tho folder renaming have its own downsides as I've seen developers using hardcoded links like this:
WP_PLUGIN_DIR.'my_plugin/myfileneeded.php'
instead of defining plugin folder within index.php or plugin.php with
plugin_dir_path( __FILE__ )
and calling files like:
plugin_dir_path( __FILE__ ) . 'myfileneeded.php'
which would have been a better and more professional approach and would call plugin files no matter what is the name of the plugin folder.
I hope I didn't get you bored with this long explanation but knowing this will help you debug and correct some errors faster.