The law wouldn't be unconstitutional, possibly the enforcement. As always only impeachment can get rid of judges.
We're slowly but surely going back to the Samuel Chase era who was impeached merely because they didn't like his decision.
Our framers were smart to set up impeachment, including requiring a supermajority in the Senate to convict.
That's a really important point.
There is a Code of Conduct for United States Judges, applicable to all federal judges except the Supreme Court, and that isn't any more authorized by the Constitution than is this proposed legislation. Violations of that Code are not cause for removal from the bench, and impeachment remains the sole avenue of enforcement.
So...wouldn't this basically be the same thing? It would be Congress sort of announcing that "these are the particular standards to which we will try to hold judges if there is an impeachment", but it isn't enforceable on its own terms, and impeachment remains the only way to get rid of it. It's basically Congress trying to announce ahead of time the standards that it might apply in a future impeachment hearing, rather than just making them up on a case by case basis as they go along.
My first reaction to this was highly negative because of the obvious motivation, but standing alone...it isn't a bad idea. What would suck worse is inventing ethical rules on the fly, without any notice, and then pushing for impeachment and removal on that basis.
Obviously, the Hirono factor means this particular effort would be screwed from the start, but it isn't a terrible idea in theory.