Add unit tests and fix some false positives when checking for calls to register_widget()

Do you think we should allow function calls of the type: `dont_register_widget()`?