Your recommendation letter should, above all, provide a truthful picture of the candidate. But you of course also know that other candidates will receive recommendation letters written by people who might shy away from mentioning weaknesses, so you don't want to exaggerate. The difficulty is not whether to include weaknesses or not, but to find the balance.
This means: if you have to write a recommendation letter for a good student, who at some point made a mistake, or have some minor disadvantage, then don't mention it.
On the other hand, if this student never kept a deadline and always had to have things repeated 4 times, it would be silly to write a stellar letter. Also: if you give that student top recommendations, what are you going to write for students who are truly great?
A good exercise (also backed by science, see eg Kahneman: "Noise") is to perform a mental ranking of this student vs other students, and make your letter reflect that raking. Say you rank this student in top 20%, you could write that, give your reasons, and also state what it would take for this student to be top 10%. Then it also does not come across as you "slamming" a particular student.
When I am asked to write a letter for a student I cannot give good recommendation, I usually tell the student this, and recommend them to find someone else who can write them a better one. They usually appreciate the honesty.