Emailed Author: ## Calling file locations poorly
The way your plugin is referencing other files is not going to work with all setups of WordPress.
When you hardcode in paths, or assume that everyone has WordPress in the root of their domain, you cause anyone using 'Giving WordPress it's own directory' (a VERY common setup) to break. In addition, WordPress allows users to change the name of wp-content, so you would break anyone who choses to do so.
Please review http://codex.wordpress.org/Determining_Plugin_and_Content_Directories and update your plugin accordingly. And don't worry about supporting WordPress 2.x or lower. We don't encourage it nor expect you to do so, so save yourself some time and energy.
protected function getPluginName( $rel_to_root_source ) {
return Cache::get( __METHOD__ . "[{$rel_to_root_source}]", function () use ( $rel_to_root_source ) {
$tokens = explode( "/", trim( $rel_to_root_source, "/" ) );
if ( count( $tokens ) > 2 ) {
if ( $tokens[0] === "wp-content" && $tokens[1] === "plugins" ) {
return $tokens[2];
}
}
return "";
} );
}
That's really not the right way to get the plugin name. Plus people rename wp-content all the time.
----
Please make sure you've addressed ALL issues brought up in this email. When you've corrected your code, reply to this email with the updated code attached as a zip, or provide a link to the new code for us to review. If you have questions, concerns, or need clarification, please reply to this email and just ask us.