Programmatically add existing pages and subpages to Appearance Menu

I wouldn’t use such plugin, I’m afraid…

wp_nav_menu stores every menu item as post. So if you add 600 items to menu, then there are 600 posts queried every time page loads.

And even worse – every such page needs some processing, getting meta data and passing through recursive Walker class…

It will kill performance of your site…