how come the 3rd and 4th leds emit little light?

low electric current

The electric company didn't provide quality electronics. The fault has nothing to do with your hardware / software.