
17 So.3d 1037 (2009)
STATE of Louisiana, Appellee,
v.
Emmanuel EDWARDS, Appellant.
No. 44,552-KA.
Court of Appeal of Louisiana, Second Circuit.
August 19, 2009.
Rehearing Denied September 17, 2009.
*1039 Kenota Pulliam, for Appellant.
J. Schuyler Marvin, District Attorney, John M. Lawrence, C. Sherburne, Sentell, III, Assistant District Attorney, for Appellee.
Before WILLIAMS, DREW and MOORE, JJ.
WILLIAMS, J.
A Webster Parish Grand Jury returned an indictment against the defendant, Emmanuel Edwards, for second degree murder, in violation of LSA-R.S. 14:30.1. The defendant pled guilty to manslaughter and was sentenced to serve 21 years in prison at hard labor. For the reasons set forth herein, we affirm the defendant's conviction and sentence.

FACTS
The defendant was the father of one-year-old Trimicia Banks ("Trimicia"). On September 15, 2006, Trimicia was left with the defendant while her mother went to work. Trimicia died while in the defendant's care. During an interview with police officers, the defendant indicated that he was the only person at home with Trimicia. He stated that Trimicia fell, hit her head, got up, crawled onto the sofa and fell asleep. The defendant also stated that he called emergency medical services when he was unable to awake the child. An autopsy revealed that Trimicia died as a result of a severe beating; autopsy photographs revealed numerous bruises and abrasions on the front and back of Trimicia's body. Photographs of the defendant's hands on the day of the incident showed cuts on his knuckles.
In October 2006, a Webster Parish Grand Jury returned an indictment, charging the defendant with the second degree murder of Trimicia, in violation of LSA-R.S. 14:30.1. In February 2007, defense counsel applied for appointment of a sanity commission, asserting that he believed the defendant lacked the mental capacity to proceed and that the defendant lacked mental capacity at the time of the alleged crime.
*1040 The trial court appointed Dr. George Seiden and Dr. Mark Vigen to examine the defendant. Dr. Seiden opined that the defendant was competent to stand trial and was not suffering from any mental disease or defect that affected his ability to understand the rightness or wrongness of his conduct at the time of the alleged offense. However, Dr. Vigen opined that the defendant did not have sufficient understanding of the court system to proceed at that time (June 2007), but that the possibility for competency restoration was highly probable. The trial court then appointed Dr. Richard Williams to complete a sanity report on the defendant. In his July 2007 report, Dr. Williams opined that the defendant was competent to stand trial and that he was not suffering from a mental disease or defect that rendered him incapable of distinguishing right from wrong at the time of the alleged offense.
A hearing was held on July 30, 2007. The minute entry states:
[Defense counsel] appeared in open court, waived the defendant, Emmanuel Edwards presence. Counsel submitted on reports from Doctors and the Court does find the defendant competent to assist in trial....
On July 30, 2008, the defendant pled guilty to manslaughter with an agreed sentence of between zero and twenty-one years in prison. The court sentenced the defendant to 21 years in prison at hard labor with credit for time served. After a motion to reconsider sentence was denied, this appeal followed.

DISCUSSION
The defendant contends he was denied due process when the trial court accepted his plea of guilty. Although the defendant did not file a motion to withdraw the guilty plea in the trial court, he argues that the guilty plea was unknowingly and unintelligently entered because he was not mentally capable of entering a guilty plea. More specifically, the defendant argues that Dr. Vigen concluded that he did not have sufficient understanding of the court system and that Drs. Seiden and Williams had not "considered the [defendant's] school records to form their opinions."[1]
A criminal defendant has a constitutional right not to be tried while legally incompetent. A state must observe procedures adequate to protect a defendant's right not to be tried while incompetent, and its failure to do so deprives the defendant of his due process right to a fair trial. Medina v. California, 505 U.S. 437, 112 S.Ct. 2572, 120 L.Ed.2d 353 (1992); State v. Carmouche, XXXX-XXXX (La.5/14/02), 872 So.2d 1020; State v. Rankin, 41,128 (La. App.2d Cir.8/23/06), 938 So.2d 1172.
In Louisiana, a legal presumption exists that a defendant is sane at the time of the offense. LSA-R.S. 15:432. To rebut the presumption of sanity and avoid criminal responsibility, the defendant has the burden of proving the affirmative defense of insanity by a preponderance of the evidence. LSA-C.Cr.P. art. 652; State v. Bridgewater, XXXX-XXXX (La.1/15/02), 823 So.2d 877; State v. Frank, 96-1136 (La.10/4/96), 679 So.2d 1365.[2] Criminal *1041 responsibility is not negated by the mere existence of a mental disease or defect. To be exempted of criminal responsibility, the defendant must show he suffered a mental disease or defect that prevented him from distinguishing between right and wrong with reference to the conduct in question. LSA-R.S. 14:14; State v. Williams, 346 So.2d 181 (La.1977).
The determination of sanity is a factual matter. State v. Sepulvado, 26,948 (La.App.2d Cir.5/10/95), 655 So.2d 623, writ denied, 95-1437 (La.11/13/95), 622 So.2d 465. A reviewing court owes the trial court's determinations as to the defendant's competency great weight, and the trial court's ruling thereon will not be disturbed on appeal absent a clear abuse of discretion. Bridgewater, supra; State v. Martin, XXXX-XXXX (La.9/22/00), 769 So.2d 1168.
It is well settled that a guilty plea, by its nature, admits factual guilt and relieves the state of the necessity to prove it by a contested trial. State v. Crosby, 338 So.2d 584 (La.1976); State v. Bourgeois, 406 So.2d 550 (La.1981). A valid guilty plea requires a showing that the defendant was informed of and waived his constitutional rights of trial by jury and confrontation and the privilege against compulsory self-incrimination. Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969); State v. Estes, 42,093 (La.App.2d Cir.5/9/07), 956 So.2d 779, writ denied, XXXX-XXXX (La.4/14/08), 978 So.2d 324.
Generally, a valid, unqualified plea of guilty waives all non-jurisdictional defects in the proceedings prior to the plea. State v. Crosby, supra; State v. Stephan, 38,612 (La.App.2d Cir.8/18/04), 880 So.2d 201. A validly entered guilty plea, or plea of nolo contendere, waives any right a defendant might have had to question the merits of the state's case and the factual basis underlying the conviction. State v. Bourgeois, supra; State v. Hardy, 39,233 (La.App.2d Cir.1/26/05), 892 So.2d 710. A validly entered guilty plea also dispenses with any appellate review of the state's case against the defendant. State v. Hardy, supra; State v. Buggs, 567 So.2d 744 (La.App. 2d Cir.1990).
In the instant case, the defendant did not reserve his right to appeal his conviction pursuant to State v. Crosby, supra. Thus, the defendant's guilty plea waived his right to challenge the merits of the state's case, including his competency to stand trial.
Nevertheless, we have reviewed this record and we find no error in the trial court's determination that the defendant was competent to stand trial. Two of the three mental health experts concluded that the defendant was competent to stand trial. Dr. George Seiden evaluated the defendant and noted that the defendant's "intelligence appeared to be somewhat below average" but concluded that the defendant was competent to stand trial. In his written report to the court, Dr. Seiden stated, in part:
Based on my evaluation, I have concluded that Emmanuel Edwards currently has the ability to consult with his attorney with a reasonable degree of rational understanding and currently has a rational and factual understanding of the proceedings against him. Although he manifested a limited knowledge of the judicial process, he was capable of understanding *1042 the process when it was explained to him and would be capable of responding appropriately to his attorney. Specifically, he understands the nature of the charge against him and can appreciate its seriousness. He understands what defenses are available to him. He can distinguish a guilty plea from a not guilty plea and understands the consequences of each. He is capable of understanding legal rights. He understands the range of possible verdicts and the consequences of conviction.
Dr. Seiden also concluded that at the time of the offense, the defendant "was not suffering from any mental disease or defect that interfered with his ability to understand the rightness or wrongness of the specific conduct in question."
Dr. Mark P. Vigen also evaluated the defendant and focused primarily on his Intelligence Quotient ("IQ").[3] Dr. Vigen concluded that the defendant did "not have sufficient understanding of the court system to proceed at this time." However, Dr. Vigen also noted that the results of the defendant's CAST-MR[4] did "not reflect a lack of competence."
After receiving the two conflicting reports, the trial court appointed Dr. Richard Williams to evaluate the defendant and to render a third opinion. Dr. Williams noted the defendant's limited IQ, but concluded that the defendant was competent to stand trial and to assist in his defense. Dr. Williams reported as follows:
Mr. Edwards states that the role of a defense attorney is "to defend me in court and get me out of this." He stated that the role of the district attorney is "He is on the other side and is going to try to make you do time." He thought that the district attorney worked for the judge, but when explained that he worked for the state, Mr. Edwards understood this and could repeat it. He states that the role of the judge is "he finds you guilty or not guilty." He knew the judge did the sentencing when asked. He stated that the role of the jury is "they decide if you're guilty or not guilty...." Mr. Edwards understands the difference between pleas of guilty and not guilty, and stated, "You admit you did it or you admit you didn't do it. You give up all your rights if you say you're guilty."
* * *
Mr. Edwards understands the charges against him and said that they "are really, really serious." Even though he does not actually know the severity as to years for the crime, he states it would be "a lot of years." He understands there is a range of time for a specific charge and that someone may get more time for lying on a plea. He states that a plea-bargain is "they try to offer you less time. They don't want to go to trial." He did not understand that this still would get a conviction, yet save the state money. However, when explained, he understood this and could repeat it.
We note that the defendant had the burden of proving incapacity to stand trial, and the trial court appointed a sanity commission at the defendant's request. Two of the three appointed experts concluded that the defendant was capable of understanding the proceedings and assisting in his defense. As noted in Dr. Williams' report, the defendant was able to express *1043 his understanding of much of the judicial process, clearly indicating his mental capacity to stand trial and assist in his defense.
As stated above, a hearing was held on July 30, 2007. Defense counsel submitted on the reports from the three doctors, and the court found the defendant competent to assist in his defense. We find no error or abuse of discretion in the trial court's conclusion that the defendant failed to rebut the presumption of sanity. The defendant did not prove by a preponderance of the evidence that he lacked the requisite mental capacity to proceed. Thus, the defendant's argument that he was not mentally capable of entering a guilty plea to the charges lacks merit.

Ineffective Assistance of Counsel
The defendant also contends he was denied his constitutional right to effective assistance of counsel. Despite his guilty plea, the defendant argues that the record does not include any evidence that he committed the offense of manslaughter, and defense counsel failed to properly investigate, advise, inform or explain the defense to him. The defendant also argues that he "entered a plea without understanding or knowing the effect of the plea," and trial counsel failed to "fully inform and represent [the defendant] in this matter." The defendant further argues that "the outcome of his case would have been different had trial counsel properly advised and counseled him as to his case."
Generally, ineffective assistance of counsel claims are addressed in post-conviction proceedings, rather than on direct appeal. State v. Leger, XXXX-XXXX (La.7/10/06), 936 So.2d 108, cert. denied, 549 U.S. 1221, 127 S.Ct. 1279, 167 L.Ed.2d 100 (2007); State v. Deruise, 98-0541 (La.4/3/01), 802 So.2d 1224, cert. denied, 534 U.S. 926, 122 S.Ct. 283, 151 L.Ed.2d 208 (2001). The post-conviction proceeding allows the trial court to conduct a full evidentiary hearing, if one is warranted. State v. Leger, supra; State v. Howard, 98-0064 (La.4/23/99), 751 So.2d 783, cert. denied, 528 U.S. 974, 120 S.Ct. 420, 145 L.Ed.2d 328 (1999). A motion for new trial is also an accepted vehicle by which to raise such a claim. State ex rel. Bailey v. City of West Monroe, 418 So.2d 570 (La. 1982); State v. Ellis, 42,520 (La.App.2d Cir.9/26/07), 966 So.2d 139. However, where the record contains evidence sufficient to decide the issue, and the issue is raised on appeal by an assignment of error, the issue may be considered in the interest of judicial economy. State v. Leger, supra; State v. Willars, 27,394 (La. App.2d Cir.9/27/95), 661 So.2d 673.
In the instant case, the defendant did not file a motion for new trial. Additionally, the defendant did not express any dissatisfaction with his trial counsel's performance. To the contrary, he informed the trial court that he was "satisfied" with his representation.
Nevertheless, we find that the record is insufficient to resolve all of the allegations of ineffective assistance of counsel raised on appeal. Therefore, these claims are best presented in an application for postconviction relief so that the defendant is afforded an opportunity to develop evidence in regard to his claims. Accordingly, these claims are not reviewable by this court at this time.
We note, however, that much of the defendant's argument with regard to ineffective assistance of counsel is connected to his argument concerning lack of mental capacity, and also suggests that the evidence was insufficient to support a conviction. In that regard, based on our review of the record, it appears that the defendant's plea of guilty to the crime of manslaughter *1044 was the result of trial counsel's goal of avoiding a conviction for second degree murder and the accompanying mandatory life sentence. Defense counsel was also successful at negotiating a "cap" on a prison term of not more than twenty-one years for the charge of manslaughter. Under these circumstances, the defendant's decision to plead guilty does not seem questionable. The defendant states that the outcome of his case would have been different had he been properly advised by trial counsel; however, the defendant has failed to demonstrate that he was prejudiced by any perceived deficiencies in his trial counsel's performance.

Excessive Sentence
The defendant contends the sentence imposed was excessive, and the trial court failed to adequately comply with the requirements set forth in LSA-C.Cr.P. art. 894.1. The defendant argues that he has no prior convictions, and the trial court was required to consider mitigating factors.
A defendant cannot appeal or seek review of a sentence imposed in conformity with a plea agreement which was set forth in the record at the time of the plea. LSA-C.Cr.P. art. 881.2(A)(2). Where a specific sentence or cap has been agreed to as part of a plea bargain, a sentence imposed within the agreed upon range cannot be appealed as excessive. State v. Young, 96-0195 (La.10/15/96), 680 So.2d 1171; State v. Bailey, 40,098 (La. App.2d Cir.10/26/05), 914 So.2d 116, writ denied, XXXX-XXXX (La.9/22/06), 937 So.2d 377; State v. West, 38,231 (La.App.2d Cir.2/4/04), 865 So.2d 326. Moreover, there was no requirement that the trial court give reasons for this type of sentencing agreement. See, State v. Bailey, supra; State v. Smith, 39,719 (La.App.2d Cir.5/11/05), 903 So.2d 598.
LSA-R.S. 14:31(B) provides:
Whoever commits manslaughter shall be imprisoned at hard labor for not more than forty years. However, if the victim killed was under the age of ten years, the offender shall be imprisoned at hard labor, without benefit of probation or suspension of sentence, for not less than ten years nor more than forty years.
In this case, the terms of the plea agreement were set forth in the record at the time the guilty plea was entered. The defendant and state entered into an agreement that the maximum sentence would be imprisonment at hard labor for not more than 21 years. The defendant was properly advised of his constitutional rights, the minimum and maximum sentences that could be imposed for the charged offense and the sentencing range under the plea agreement. The defendant voiced his understanding of the agreement and voluntarily entered his plea in accordance with that agreement. The sentence imposed, 21 years at hard labor, was well within the terms of the agreement and is not appealable.
Although we have concluded that the trial court was not required to articulate reasons for the sentence imposed, we find that the record belies the defendant's argument that the trial court failed to do so. The court reviewed the presentence investigation ("PSI") report and stated that the defendant was 19 at the time of the crime, and the victim was one-year-old. The court noted that the autopsy showed the victim, who was not injured when she was left alone in the defendant's care, died as the result of a severe beating. The court reviewed the defendant's educational history and employment history, and noted that the defendant had no juvenile record and no previous adult conviction. The court next stated that it had considered LSA-C.Cr.P. art. 894.1 and found the defendant *1045 to be in need of correctional treatment that could most effectively be provided by his commitment to an institution. The court further found that a lesser sentence would deprecate the seriousness of the offense. The court noted that the defendant should have known that the victim was particularly vulnerable or incapable of resistance and that there were no grounds to excuse or justify the defendant's conduct.
In mitigation, the court considered the above-mentioned lack of criminal history; however, it stated, "Whatever mitigation was considered, was certainly given to you by the attorneys in reaching the plea agreement that they did...." The court then informed the defendant that it had shown leniency in agreeing to accept the guilty plea and the recommended sentencing cap.
Based on our review of the entire record of these proceedings, we are convinced that the sentence imposed was not excessive. The defendant pled guilty to killing his one-year-old child. Because the victim was under the age of ten years, the defendant was exposed to a sentence of not less than 10 and not more that 40 years at hard labor, without benefit of probation or suspension of sentence. Despite the heinousness of this crime, the trial court granted leniency to this defendant by accepting the recommended sentencing cap agreed to by the state and the defendant. We find that the sentence was neither disproportionate to the offense of conviction, nor shocking to the sense of justice. Thus, the sentence imposed is not constitutionally excessive. This argument lacks merit.[5]

CONCLUSION
For the reasons set forth herein, we hereby affirm the defendant's conviction and sentence.
AFFIRMED.
APPLICATION FOR REHEARING
Before WILLIAMS, STEWART, PEATROSS, DREW and MOORE, JJ.
Rehearing denied.
NOTES
[1]  The record shows that the defendant was in special education classes while in school and was classified with mild mental disabilities.
[2]  LSA-C.Cr.P. art. 648(A) provides that the incapacity to stand trial must be proven by clear and convincing evidence. However, in Cooper v. Oklahoma, 517 U.S. 348, 116 S.Ct. 1373, 134 L.Ed.2d 498 (1996), the United States Supreme Court struck down an Oklahoma statute which required proof of incompetence by clear and convincing evidence. The Court held that the statute violated due process by allowing the trial of a defendant who was more likely than not incompetent. Citing Cooper, the Louisiana Supreme Court has held that incapacity to proceed to trial must be proven by a preponderance of the evidence. State v. Bridgewater, XXXX-XXXX (La. 1/15/02), 823 So.2d 877; State v. Frank, 96-1136 (La. 10/4/96), 679 So.2d 1365.
[3]  Dr. Seiden stated that the defendant had an IQ of 70; Dr. Vigen reported the defendant's IQ as 65; Dr. Williams stated that the defendant's IQ was within the 70 to 75 range.
[4]  The CAST-MR is a standardized instrument used by forensic evaluators to assess the competence of mentally retarded defendants to stand trial.
[5]  We note that the trial court did not specifically state that the defendant's sentence is to be served without benefit of probation or suspension of sentence as required by LSA-R.S. 14:31(B). However, by virtue of LSA-R.S. 15:301.1, the sentence "shall be deemed to contain the provisions relating to the service of that sentence without benefit of probation, parole, or suspension of sentence." LSA-R.S. 15:301.1(A).
