Solution:
To properly encode the Worpdress plugin file, open up the main plugin file. For example the main plugin file is plugger.php
Remove the WordPress header comment:
/*
Plugin Name: plugger
*/
Encode the files using ioncube. Copy the encoded files into the WordPress plugin directory. Then rename the main plugin file, for example plugger-file.php. Then create a new file, this will be the main plugin file plugger.php. Inside plugger.php add the WordPress header comments so that WordPress will recognize the plugin then include the plugger-file.php
/*
Plugin Name: plugger
*/
include_once(‘plugger.php’);