Start with the foundations first.
Get the site speed right.
Make sure its mobile optimized.
Optimize the onpage SEO. h1,h2,h3 tags etc. Check for duplicate content.
You would be better off running it through a tool like ahrefs or semrush to see what the issues are. Not to sure you could analyse millions of pages though.