I'd recommend 'Ordered to Die' by Edward Erickson.
For a short answer: The Ottomans had with them some very bright minds, while also having some very un-bright minds in the ranks of the Ottoman High Command, namely: Enver Pasha.
The Ottomans knew at the beginning of the war that they could not muster the forces to beat the Allied powers in costly offensives, yet they could hold out in a long war by limiting recruitment and also mustering along points that would prove to be bottlenecks for any invading force. In the Caucasus, the Ottomans win the first major battle, decimating half the Russian army in Bergman's Offensive. yet had Enver Pasha not forced the offensive the Ottoman army may have decimated the Russian Imperial Caucasus army in 1915. Instead Envar Pasha destroyed an Ottoman Army in the mountains fighting the harsh climate where out of the 120,000 troops that could have held the Russians off for many years, they returned to there starting positions with around 20,000 troops.
In the Middle east the Ottomans recruited many tribes to their cause, in Iraq the Ottoman regular army of 50,000 troops, was mustered by an equal or larger number of tribal warriors coming to aid the Ottomans, making the Ottoman army in the region equal to 100,000 or more.
As for Macedonia the Ottomans sent some of there best units, when they could have been used else-ware to great effect, these units combined with German and Austro-Hungarian supply lines were extremely effective.
The Ottoman army had an excellent army quality, horrible officer core, and a great General staff, except Enver Pasha.
In the conclusion of Ordered to Die, Edward Erickson states that the only way for the Ottomans to do better in the war was the exit of Enver pasha from command, either through force or through him backing down. As the Ottoman army was proving to be an incredible challenge to the combined forces of France, the British Empire, and Russia. The Caucasus offensive was a horrible idea in 1917 as the Ottomans could have used that force in the South against the British, and with sufficient force may have even stopped it. Had the Ottoman Empire held a defensive they may have not lost all of Syria and Iraq, as they had been preparing an army group "The Lightning Army Group" to serve as a German styled strike force against the Allies in these regions which could have been buffed with the Ottoman forces from Iran and the Caucasus and there was an army of 40,000 Ottoman troops in Yemen and Medina which could have been brought out of the Hejaz and let loose on the British army dividing it, or even smuggling this army to the North where they could further enhance Ottoman capabilities.
The Ottomans could have most likely come out of the war even better then they were in 1918 had Enver Pasha simply let better Generals do there thing, yet he would continuously fail leading to the deaths of millions directly and indirectly.