The problem happens when you have a function declared in the root file of the plugin or in the functions.php file of a theme. You need to require_once a file for functions and move those functions into that file.
For example:
Your plugin is called some-plugin and the root file is some-plugin.php. Any function on the file some-plugin.php will cause an error in wp-load. So create a file called some-plugin-functions.php and require it once like
require_once('some-plugin-functions.php');
and move your functions to that file. This will eliminate the error message.