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.
In addition to asking them to write some code, we also have each member of the team interview them onsite to get a sense of how they'd interact as a member of the team. The challenge does take a few hours, which is longer than a typical phone screen or single onsite interview, but because it lets us focus on getting to know the person onsite rather than go through a gauntlet of whiteboarding interviews, we think it actually saves time for everyone and is a win-win. Obviously, every candidate is different; we think of this not as a rigid template, but a better default option than whiteboard interviews. Thanks for your thoughts!
Not to mention for a qualified professional candidate, it feels an awful lot like you're asking them to work for free.