They are commended for: deeds, hard work, perseverance, detection of false apostles, enduring hardships and not growing weary. But "...You have forsaken your first love." (2:4).
"Remember the height from which you have fallen! Repent and do the things you did at first..." (2:5).
Ephesus was the commercial center of Asia and approximately the geographical center of the Roman empire and of the Christian population in John's day. Its temple of Diana was one of the Seven Wonders of the World. It is believed that John wrote his Gospel, three Epistles and possibly Revelation in Ephesus. Three of Paul's Epistles related to Ephesus: Ephesians and 1 & 2 Timothy. The two Epistles of Peter and that of Jude may have been first issued in the region also.
The Ephesian Church was not lukewarm like the Laodicean Church, but headed in that direction. The site of the city of Ephesus eventually became deserted. Perhaps the lessons of the Old Testament apply here: The practices of one's neighbors can easily rub off on one's self when a person lives in close proximity to people who practice immoral behavior (even if they claim to be Christians). The false apostles probably tried to harmonize the immoral indulgences of idol worship with the Christian faith. It is believed that priestesses of Diana, and other related idols, were public prostitutes.
There seems to be a definite relationship here between repentance (2:5) and forgiveness -- "...the right to eat from the tree of life..." (2:7).