Well, it completely depends on what the purpose of your ranking system is. Building evenly competitive teams, or simply providing a list of the best players for personal satisfaction.
Case 1: Optimally Balancing Teams
It is worth noting that a good team isn't necessarily the team of the most skilled players but rather the most balanced team offensively and defensively. Your question reads like you play more of a small-sided game or park football, which is more suited to unstructured play with utility-style (no fixed position) players but even so a well structured team would comfortably beat a park team.
I have coached low-grade football for many years, and an important skill is dividing the playing squad into fair teams at training to maximise the benefit of drills and scratch matches. There is no way to do this mathematically; you have to observe your players and note their individual strengths and weaknesses, try them in different roles and mess with the formula until you get it right. Players aren't robots, they will perform differently on different days- the right squad on a Tuesday may be completely off on a Thursday.
For the purposes of your situation, my recommendation would be to assign two people (possibly including yourself, or whoever the group feel is the most knowledgeable, reliable and balanced) to have the responsibility of picking the teams. These people should then confer after matches about who was good and where, who was out of their depth and where, and use this to create a "fuzzy" ranking system (ideally, impart some structure and rate players defensively, offensively, or even in finer detail such as passing, tackling, dribbling etc). This can then be used to pick the next two teams, ensuring an even balance of playing style and ability. The two who pick the teams then are separated into a team each (for further impartiality, one is nominated to flip a coin - heads they are team one, tails team two).
Case 2: Individual Ranking For Personal Glory
OK, cautionary warning here, nobody likes being told they are the worst (or amongst the worst) at something. Especially when they are with friends. Letting team-mates down is bad enough, letting friends down is even worse. Having a public leader-board of player rankings may encourage middle and upper level players to push higher, but you do so at the risk that you will lose your players propping up the table. You've already said you have trouble with consistent attendance week-to-week, implicitly shaming players could very well make that worse.
If you are ranking players purely to find the best, as some sort of reward mechanism, many clubs run a voting system amongst players to determine this for end of year awards. Have your players submit 3-2-1 votes (3pts = best, 2pts = second best, 1pt = third best) for their team-mates for the match, average them over the number of players (this prevents a player from having a blinder that puts them way in front, but being mediocre afterwards and still winning it) then tally them up in a private leader-board. Publicly make available the top subset of this list if your players want it (say top 5) so Fred can say "I'm fourth, I'm going to try even harder and get ahead of Bob in third", whilst sparing the less skilled players from the public humiliation of being last. Having the players do it for their own team means that good players in a losing team are still acknowledged.
Important Side Note
It is for a similar reason to the above private leader-board that I would stop using the "captains pick" team selection method. You are telling the last people picked that they aren't wanted, which is awful for morale, enjoying the game, and will only lead to worse performance. Good examples of fair team selection include:
- Line up players by height, or
- Line up players by age/date of birth, or
- Line up players alphabetically by first/last name, and then go along the line labelling them alternately "team 1" or "team 2"
Pick characteristics that are completely not skill related. If one method unbalances the sides, choose another the next week. At no point is anyone being given the impression that they are the last choice, or only being picked because the team needs another player.
If you get a good combination going, try to stick with it. It is always better to have a group that plays together every week with minimal changes to the team. If a team is missing a player, ask for a volunteer to go across from the other team rather than dictating. Should no-one volunteer, draw straws or equivalent. Keep it as random as possible.