Replace object with other object

I would like to replace all object in scene by another object
Is there any way to make tool in editor?

I see 2 ways: To create a custom Menu Item (see MenuItem attribute documentation), or to make a executable in editor class with custom editor (see ExecuteInEditor and CustomEditor attributes docs)