How to add a custom menu item to the object menu?
Following code adds the open file operator and a label to three different places:

import bpy

def custom_draw(self, context):
    self.layout.operator("wm.open_mainfile")
    self.layout.label(text="Hello world!", icon='WORLD_DATA')

bpy.types.VIEW3D_MT_object.append(custom_draw) # Object menu
bpy.types.VIEW3D_MT_snap.append(custom_draw)   # Snap menu
bpy.types.TOPBAR_MT_render.append(custom_draw) # Render menu


https://docs.blender.org/api/current/bpy.types.Menu.html?highlight=prepend#extending-menus