Behind “altogether lovely” stand the Hebrew consonants m-ḥ-m-d: kullō maḥămaddîm. A woman is describing the man she loves in a love poem, and the claim is that the poem also carries the name Muhammad.
The grammar is not seriously contested. Maḥămaddîm is the plural of the common noun maḥmād, a desirable or precious thing, commonly taken as the plural Hebrew uses for emphasis: he is altogether desirable. The same noun appears doing ordinary work, in “Whatever is pleasant in your eyes” (1 Kings 20:6), in Lamentations 1:10, and at Hosea 9:6. Standard Hebrew lexicons carry the entry (BDB, s.v. maḥmād ↗). That much is known at the level of the lexicon.
Zakir Naik has argued in widely circulated lectures that the consonants spell Muhammad, with -îm read as a plural of respect, and the claim appears earlier in Abdul Haq Vidyarthi's Muhammad in World Scriptures (1940). The Muslim argument goes beyond the dictionary, because the Song is poetry, a poem that calls itself the Song of Songs, and deliberate double meaning is documented in it: when Cyrus Gordon, a scholar of Semitic languages, needed a name for the device in which one word faces two directions at once, he coined it, Janus parallelism, from this very book, where in Song 2:12 zāmîr can mean both pruning and singing and the poem means both. One proposed reading of the Song's own cast plays on a proper name. The woman is called the Shulammite, a title some scholars read as a play on Shelomoh, the Hebrew name of Solomon. Others derive it from the town of Shunem or from the root sh-l-m. A word carrying two senses at once is not foreign to this book.
Two facts of the language family carry the rest of the Muslim case. Hebrew and Arabic are sister languages, and ḥ-m-d is one Semitic root shared between them: Hebrew took it toward what is desired and precious, Arabic toward what is praised, and Muhammad, the praised one, is built on it. And Hebrew does use -îm in a way that is not about number: the grammars call it the plural of majesty, the ending that gives Elohim for the one God and adonim for a single master, plural forms that take singular verbs (Gesenius §124 ↗). Muslim interpreters argue that maḥămaddîm belongs in that family. The grammar books themselves file the word under the plural Hebrew uses for emphasis, he is altogether desirable, and the verse has no verb whose form could settle the question. The grammar shows emphasis, and by itself it shows nothing more.
One more fact comes from counting every place the word appears. Everywhere else the plural of maḥmād appears in the Hebrew Bible, it is tied to an owner or to the word after it: her precious things, our precious things, the desirable of the eye. Song of Solomon 5:16 is the only verse where the plural stands alone, and it describes a beloved man. The layers of the text then divide the evidence. The written vowel marks came from the Masoretes, scribes working between roughly the seventh and tenth centuries CE, though the marks record a way of reading older than the marks themselves; how the Hebrew text reached that standard form is a study of its own: how was the Old Testament put together? And translators working before Islam already treat the expression as ordinary description: the Old Greek has holos epithymia, altogether an object of desire, and the Vulgate, the church's Latin translation, has totus desiderabilis, wholly desirable. Muslim interpreters answer that a translation flattens exactly what a double meaning is, that a double meaning like this need not survive translation, and that their claim concerns the older consonantal text rather than the later vowel marks.
So the Muslim reading asks the reader to weigh three facts together, and then to weigh the odds. The Song is a poem with documented double meaning; Hebrew and Arabic are sister languages sharing the root ḥ-m-d; and the one place in scripture where this plural stands alone, it stands in a love song, describing a beloved man, on the consonants m-ḥ-m-d. Jewish and Christian readers answer that the plain sense is complete without a name, that the pre-Islamic translations read it that way, and that nothing else in the verse cues a name. Muslim interpreters answer with a question about odds: grant each fact on its own, then explain all three landing together, in the very book that gave this double-facing device its name, as an accident. Muslim interpreters and Jewish and Christian readers still dispute the identification.