There does seem to be a Scriptural basis ordering of loves:
God should have priority in our loves above everybody else (Deut. 6:5; Matt. 22:37; Mark 12:30; Luke 19:27). The command to love him precedes the command to love our neighbor. We ought to love our neighbor because he is made in God’s image. Indeed, one must give God priority over one’s highest loves: one’s own life, father, mother, wife, children, brothers and sisters (Ex. 32:25-29; Dt. 13:6-10; 33:8-9).
The neighbor that we are obligated to love should be understood expansively to include all people (Luke 10:29-37). And yet, there is within that category an ordering of loves. Paul says, “as we have opportunity, let us do good to everyone,” but he introduces an order when he says, “especially to those who are of the household of faith” (Gal. 6:10). Similarly Paul taught that Christians are to be honest with other Christians “for we are members one of another” (Eph. 4:25). This does not mean that Christians may lie to unbelievers, but there are additional reasons for not lying to other Christians (see S. M. Baugh, Ephesians, EEC, 390-91).
The priority given to love of family is taught when Paul says,” If anyone does not provide for his relatives, and especially for members of his household, he has denied the faith and is worse than an unbeliever (1 Tim. 5:8).” Likewise, the command for children to honor their father and mother sets the father and mother apart in terms of the children’s priority of loves (Ex. 20:12; Dt. 5:6; Eph. 6:1-2). The leaving of father and mother and cleaving to one’s wife show the priority that spouses have in the ordering of loves (Gen. 2:24).
Thus, after God one’s spouse, children, and parents–followed by other relatives–have a priority in one’s love. But the natural family at times ought to give way to the family created by union with Christ, such as when Jesus identifies as his mother and brothers “those who hear the word of God and do it (Luke 8:21).
Most people also recognize the importance of proximity in helping others. The good Samaritan helped the he came across in his path.
Note also that the ordering of loves does not contravene the command to love all men, because Christians are to love even their enemies (Matt. 5:44-45). Furthermore, the Christian may not give preference to the rich over the poor, or give preference to those whom they think might in turn benefit them (James 2:1; Jude 16). That would be a wrong ordering of loves.
Sources: Peter Lombard, Sentences bk. 3, dist. 29; Thomas Aquinas, Commentary on the Sentences of Peter Lombard, Bk. 3, Dist. 29, art. 6; Godefridus Udemans, The Practice of True Faith, Hope, and Love, Classics of Reformed Spirituality (Grand Rapids: Reformation Heritage, 2012), Kindle loc 451; Wilhelmus à Brakel, The Christian’s Reasonable Service, ed. Joel R. Beeke, trans. Bartel Elshout (Grand Rapids: Reformation Heritage1995), 4:54.