I'm writing my wordpress plugin and you will find some codes have to be share between my theme and my wordpress plugin,
My thought is within my wordpress plugin file use

include '../../themes/mytheme/path_to_mysharecodes.php'

Shall We Be Held right?Can there be a stylish way?