I wouldn't say exactly "poorly"...
Some quick math: the Ukrainian Army has 215,000 soldiers who have been armed and trained close to NATO standards.
There are another 200,000 reservists, 50,000 border guards, and 60,000 National Guards. Now they're also mobilizing civilians.
Russia has assembled some 200,000 forces in the vicinity of Ukraine, 70,000 of whom have as of this date actually entered Ukraine.
Normal attacker-defender ratios call for a 3:1 advantage for the attacker. Russia is attacking with a 1:7 disadvantage.
As defender, you don't put all of your defense at the border. It's expected that attacking forces make initial gains, and add reinforcements where needed. The same goes with the defense, where reserve is allocated to protect vital and strategic points.
From what I've seen so far, and I am surprised, Russians are not using their newest tanks, all of them are versions of T-72. Maybe that explains high Russian loses, or Putin expected Ukraine would cave at first signs of war. Russia is stretching their supply lines which make them more vulnerable, and gives Ukraine opportunities to flank and cut off, or capture some equipment they could use.