And hereby we do know that we know him, if we keep his commandments. He that saith, I know him, and keepeth not his commandments, is a liar, and the truth is not in him. But whoso keepeth his word, in him verily is the love of God perfected: hereby know we that we are in him. He that saith he abideth in him ought himself also so to walk, even as he walked. (1 John 2:3-6 KJV)
These verses are so misused by those religious organizations and cults that promote a works salvation. They point to these verses and say, "See, I'm a Christian! I keep the commandments! I do as Jesus would do."
The problem is in the fact that John is talking about the heart condition and the groups that teach a works salvation are focused on the outward appearance of things. Jesus said that if a man looks on a woman with lust he has committed adultry in his heart.
We may be the most squeaky clean moral, upright people on the planet outwardly, but that doesn't mean God's love is perfected in us or that we are Christians.
Actually, not one person can keep the law (commandments) perfectly. That is why Christ came. He did it for us so we could be accepted by the Father. We must believe on Him for this to be applied to our lives. Then the Holy Spirit will work in our hearts to sanctify us and make us holy. Only through Him can we truly keep His commandments.