The thief on the cross did everything he could, everything he had opportunity to do which in his case was simply to recognize the supreme goodness of and express faith in the Son of God there at his side. If he'd been allowed down from that cross then he'd be expected to pick up his cross daily and follow Jesus, doing His will the best he could. That's what all of us are expected to do-the best we can do with whatever we've been given-the Parable of the Talents sheds great light on this. Righteousness is a gift of God as He justifies us: forgiving, cleansing, and making us into new creations. Most of us as believers will have the opportunity and the power by the Spirit to now express and grow in the holiness, the love, we've been shown and given, as per the following passages as examples:
"Make every effort to live in peace with everyone and to be holy; without holiness no one will see the Lord." Heb 12:14
"To those who by persistence in doing good seek glory, honor and immortality, He will give eternal life." Rom 2:7
"But now that you have been set free from sin and have become slaves of God, the benefit you reap leads to holiness, and the result is eternal life." Rom 6:22
"Therefore, brothers and sisters, we have an obligation—but it is not to the flesh, to live according to it. For if you live according to the flesh, you will die; but if by the Spirit you put to death the misdeeds of the body, you will live. For those who are led by the Spirit of God are the children of God." Rom 8:12-14
"For if you forgive other people when they sin against you, your heavenly Father will also forgive you. But if you do not forgive others their sins, your Father will not forgive your sins." Matt 6:14-15
At the end of the day God, alone, will be the judge as to how we did with the grace He gave us. And a related question: how much sin could we we remain in and still be considered a child of God?
And, yes, James is instructing and warning us: examine yourself, don't be so certain. Good works are the evidence of faith, hope, and, especially, love. Similarly John tells us to weigh ourselves against the love we have-and the sin we're free of. Either way, salvation simply cannot be separated from our becoming increasingly transformed into the image of God-and away from the image of the devil.