It’s a bad idea. These laws are written so that the votes go to the *perceived* winner of the election. And (how’s this for surprising) the perceived winner will almost always be the left wing candidate.
The idea of awarding a state's electoral votes to the candidate who gets the most popular votes nationally is an awful idea. This California plan isn't bad though.