Metathesis is common across languages, including in the varieties of Romance that emerged from Vulgar Latin. However, Western Romance had it more than Eastern Romance; within Western Romance, Iberian Romance appears to have had it more than Gallo-Romance.
Consonant clusters involving a dental and /n/ and /l/
In Western Romance, many new clusters of /tn/ were formed from the loss of a vowel. For example: Classical Latin
retineō > Vulgar Latin
*retina underwent intervocalic voicing to form
*/ˈrɛdina/, preserved in Italian as redine. But the unstressed vowel in the middle was lost in Western Romance, giving
*/ˈrɛdna/ which led to different outcomes:
Metathesis: Spanish rienda, Galician renda
Lenition > Assimilation: French resne > rêne, from which English rein
Dissimilation: Catalan regna
Another good example: descendants of Latin
Assimilation /t/ to /l/: Italian spalla, Sicilian spadda; also Friulian spale, Walloon spale, Venetian spała, and French espalle > espaule > épaule
Dissimilation of the /l/: Catalan espatlla
Metathesis: Spanish espalda, Portuguese espalda
preserved: Romansch spatla, Occitan espatla
Metathesis between /r/ and /l/
These two sounds are traditionally classified as "liquids", and they commonly underwent metathesis in both directions.
The renowned example of Old French crocodile ~ cocodril actually dates from medieval Latin
cocodrillus, and modern languages probably fell on one side or the other in the early modern period. These are probably "semi-learned" borrowings rather than being fully inherited.
Nonetheless, semi-learned but genuine examples such as Latin
miraculum > Spanish milagro, Galician and Portuguese milagre;
periculum > Spanish peligro, Asturian and Leonese peligru (metathesis didn't happen in Galician and Portuguese perigo) testify to how common it was.
This surfaces as changes in the vowel in the modern language, and is common to much of Western Romance. It is most obvious with Latin /sj/ and /rj/ glides. For example, for Latin
caseus, resulted in Spanish and Aragonese queso, Galician queixo, Portuguese queijo, Leonese queisu, but Sardinian casu, Neapolitan caso, Sicilian caciu, Italian cacio, Romanian caș.
In this case, Portuguese goes further than Spanish, as metathesis seems to have happened with Latin words with /pj/ and /bj/, e.g. Latin
apiu led to Spanish and Galician apio but Portuguese aipo, Latin
rabia led to Spanish and Galician rabia but Portuguese raiva.
Stronger metathesis in Old Spanish
There were quite a few more examples in Old Spanish, especially in certain future tense conjugations (such as the regular tenré and after metathesis terné, as well as the version tendré with consonant insertion which is the modern standard form). In summary, from an optimality perspective, a rising sonority across the syllable boundary led to a lot of metathesis, in a tendency to preserve the usual "sonority cycle" that makes up a syllable.
This also included the second person plural imperatives with enclitic object pronouns, e.g. decid + lo making decildo as well as the regular decidlo. The article says that this became non-productive by the 17th century, as the
ALIGN constraint moved above the markedness constraint