Anything more than an hour or two should be paid for. That's been my experience interviewing across London and SF.
Completely agree with the author, being asked to create potentially production-izable work is ethically wrong.
On the flip side, you learn a ton about how the engineering culture by looking at their codebase.