How to script add-on info and warnings?
https://docs.blender.org/api/current/bpy.types.WindowManager.html#bpy.types.WindowManager.popup_menu

import bpy

def oops(self, context):
    self.layout.label("You have done something you shouldn't do!")

bpy.context.window_manager.popup_menu(oops, title="Error", icon='ERROR')