Yours sounds like an approach that measures how well someone codes in a vacuum, instead of how they operate on a team. It very much skews the results...
Not to mention for a qualified professional candidate, it feels an awful lot like you're asking them to work for free.