Here is the entire passage in the NIV:
"You have heard that it was said, 'Love your neighbor and hate your enemy.' But I tell you: Love your enemies and pray for those who persecute you, THAT YOU MAY BE SONS OF YOUR FATHER IN HEAVEN. He causes his sun to rise on the evil and the good, and sends rain on the righteous and unrighteous. If you love those who love you, what reward will you get? Are not even the tax collectors doing that? And if you greet only your brothers, what are you doing more than others? Do not even the pagans do that? Be perfect, therefore, AS YOUR HEAVENLY FATHER is perfect."
Read in its literary context, this passage is not commanding that we be perfect or mature in any global way. The passage is making a much more focused point.
This much more focused point is that, like our heavenly father, we ought to treat all people with respect [love] regardless of how similar to or different from us they are.
To use today's jargon, the passage as a whole, including the last verse, is about how we ought to relate to "the other" and not about how close or far our lives might be or can be from some comprehensive ethical optimum.
Therefore, of all the other passages in the New Testament, the one that is closest in meaning to Matthew 5: 43 - 48 is Galatians 3:28:
"There is neither Jew nor Greek, slave or free, male or female, for you are all one in Christ Jesus."
For hundreds of years millions of words have been written and spoken about Matthew 5:48 without reference to Matthew 5: 43 - 47. This would cause much mirth were it not for the fact that these words have wounded people, alienated friends and relatives, disgusted children and grandchildren and, I believe, increased stress that made people more vulnerable to disease and premature death.
Any time now it will be OK for us to stop these endless, pointless and often hurtful debates and start learning how to treat with respect and even-handedness those who are very different, as does our Heavenly Father.
Then, and only then, will we have read the whole Matthew 5:43-48 aright.