'99 VW Beetle has rough start but when warm runs fine-help!

My Beetle has been annoying me with this recently. When I don’t drive it for a few days, it has a really rough start. If I get in the car and try to move it without having warmed up the engine, it will tremble and shake and most likely stall. When it doesn’t stall, it will do what it did yesterday–which was to sputter along. Other times, I just idle it for 5 minutes or so and this doesn’t happen. The weird thing is that yesterday, I did the former and it sputtered along and I got worried so I turned the car off. Then out of frustration, I turned it on again and it just stalled on me. I decided that I would floor the car with the parking brake on before it had a chance to stall. After revving it up a few times, it was like nothing ever happened. The car ran fine and I could turn it off/start it without incident. THe weird thing is that as I was revving, there were two moments when I heard a weird clack/metal sound coming from the engine as if something was coming loose or is not clicking. That worries me. Any thoughts what is going on? IS it a goner?

When was the last time this car had a tuneup? That is, spark plugs, spark plug wires, filters, etc.?

I think it could be something as simple as a very dirty plug or one with an eroded tip.

I can think of several possible issues. However let’s start with some basics. When was the last time you replaced the plugs, wires fuel and air filters? If you can’t remember, it is time. Frankly I am leaning towards the plug wires. Also stop by your local auto parts store and have them check to see if there are any error codes to report. Get the exact code (like P0123). Some places will do this for free, try Autozone or Advanced Auto Parts.

It probably does need a tune-up. The spark plugs have been cleaned recently because when I was getting the oil changed, the guy said they were dirty. The check engine light was on maybe 2 weeks back and then it magically turned itself off. I should bring it to get a tune-up…