@ChrisW As is clear from the encyclopedia article, it's "counsel" (optional) as opposed to "precept" (required) which has to be obeyed by all Christians.
Matt 5:43-48 is "precept" because Christians need to have the character of God our Father who love us while we were still sinners, although of course if we
remain sinners God would reject us on the Day of Judgment. The meaning of "perfect" here is different.