Since the code relies on properly registered sidebars with the class and id parameters set it might be a good idea to add an option to let this plugin try and fix the invalid ones.
If the before_widget and after_widget content isn't correct we can add a wrapper div with only this plugin's data.
Only add this as an option in the setting page, not by default.