There are some coding sites that detect algorithm time and space complexity. Its tough to automate measuring code architecture, like if the task if appropriately divided into functions that compute individual parts, whether its aptly named, comments where code is less clear etc. Thats where a good interviewer comes in.