Several times this week I've came upon people talking about who is in Heaven and why and this verse popped into my head. The first time they were talking about "Dave" who was in Church every Sunday so when he died they were sure he was in Heaven. Then there was the teacher who gave M & M's for good behavior and took them away for bad behavior saying this is much like how you will get to heaven. Then the grandmother who told her grandchildren Grandpa went to heaven only to be told maybe not, he wasn't a nice man....
Each time these people talked to me that verse I'd learned long ago when through my mind. "By faith are ye saved, not by works, lest any man should boast.
God isn't taking attendance at Church but he is paying attention to what you do to the "least of these" Matthew 25:40 "The King will reply, 'I tell you the truth, whatever you did for one of the least of these brothers of mine, you did for me.'
Jesus also said "Behold, I stand at the door and knock." He does not say I'll huff and I'll puff and I'll blow your house down, God/Jesus/Holy Spirit needs to be invited in to our hearts to live. And then while we are living with the Trinity our lives will be on track and then we will be saved from hell.
Live your life for God and the works will still be ther