There is practice and there is fooling around. Which do you do? You may think you practice the guitar for a certain number of hours a day, but what are you really doing? It's easy to strum that familiar tune and then gaze out the window as you think about being on stage or playing like Jimmy Hendricks or whichever star is your hero. Then you play a few more notes and a riff here or there and decide to break for a coffee. My friend, that is noodling, not practice.
Get serious! Set up that metronome and play the latest addition to your repertoire with it tapping out the right beat. In fact set it onto extra slow and play the tune through. See how it's actually harder to play at a slow speed? Keep it up until that sucker is perfect, then start to speed it up a bit. If you get most of it right, but seem to have trouble with a certain part, don't play the whole tune over and over, but isolate that troublesome part and play it alone very slowly, over and over until you get it right.
Remember your attention span. We are told that the human brain can only pay attention for from two to five minutes. Pretty short, hey? Well give yourself a time limit of about fifteen minutes, set a timer and don't stop playing until you hear the beep. Take a few minutes break to ease your fingers and brain, and then get right back into it again.
Breathe! Some people actually hold their breath when learning to play a difficult piece. This increases your tension and makes it harder to get those fingers in the right position. It will also make you tired more quickly. When you've finished practicing that new, harder piece, reward yourself by playing a tune you really like. Save doing that until the very last so that it can also be a reward for all those scales and arpeggios you practiced so diligently.
Take a break in the middle of your practice to read up on the theory. This will rest your fingers while still exercising your brain. While you are playing, try and visualize what you are doing. Doing this is a well-known and useful tool for learning music. When you first start, warm up with scales and such before you attempt a new piece. If you do two and a quarter hours with fifteen minutes for each section, leave the new piece for the second last fifteen-minute section.