Poorly Built, Doesn't work
Where to begin
First off, the plugin includes a kludgey hack to include pluggables.php at the start. Why does it do this? A code comment says it’s to fix bug when wp_get_current_user is called, but this isn’t a WP Core bug, it’s a Brightcove bug.
Further down the file is a section titled ‘GLOBALS’, which assigns a lot of strings into a global array. Some of theses are role dependent and call ‘current_user_can’ which calls wp_get_current_user before it’s loaded. Simply putting all of that section inside a function called on the init hook would fix everything.
Because of this, users cannot login to the admin panel on plugin activation, locking a user our of their site.
That’s not all though.
Once the fix is applied locally, the plugin directs the user to fill in their Brightcove details, but the settings page isn’t available and cannot be loaded. Instead the user gets a standard ‘you dont have the privilledges to view this’ screen.
Coupled with a complete lack of consistent indenting, the plugin is in need of a hefty dose of cleaning
- The topic ‘Poorly Built, Doesn't work’ is closed to new replies.