*2Defendant and appellant Cesar Cortez was charged with possession of methamphetamine ( Health & Saf. Code, § 11377, subd. (a) ) and possession of a device used for smoking narcotics ( Health & Saf. Code, § 11364, subd. (a) ). Following the denial of his motion to suppress *3evidence ( Pen. Code, § 1538.5 ),1 defendant filled out a form indicating his desire to enter a plea of guilty to the charge of possessing methamphetamine and be placed on the trial court's Deferred Entry of Judgment (DEJ) program (§ 1000 et seq.). The trial court accepted defendant's guilty plea, placed defendant on DEJ, and dismissed the remaining charge.
Pursuant to the statutory requirements for DEJ, sentencing and judgment were deferred for 18 months and, if defendant complied with the conditions of DEJ, his case would be dismissed upon the expiration of that period. To achieve a dismissal, defendant was required to: complete a court-approved counseling program or attend 52 Alcoholics (or Narcotics) Anonymous meetings; abstain from possessing controlled substances or related paraphernalia; refrain from associating with drug users or sellers; and submit to warrantless searches and seizures by peace officers. Defendant represented to the trial court that he understood DEJ and agreed to participate in the program.
After defendant was placed on DEJ, he filed a notice of appeal challenging the court's order denying his motion to suppress. In his opening brief, defendant states the appeal is authorized "because it affects the substantial rights of the party ...." The People filed a respondent's brief defending the propriety of the order but also taking the position that, because judgment has been deferred, the order is not appealable. Defendant did not file a reply brief so the People's argument (particularly with respect to appealability) has not been rebutted. We agree with the People on the jurisdictional issue and dismiss the appeal.
DISCUSSION
"The right to appeal is statutory only, and a party may not appeal a trial court's judgment, order or ruling unless such is expressly made appealable by statute. [Citations.]" ( People v. Loper (2015) 60 Cal.4th 1155, 1159, 184 Cal.Rptr.3d 715, 343 P.3d 895 ; see also People v. Gallardo (2000) 77 Cal.App.4th 971, 980, 92 Cal.Rptr.2d 161.) Because defendant only pled guilty to a misdemeanor offense, we limit our review to four statutory provisions authorizing appeals in misdemeanor cases-section 1466, subdivision (b)(1) (a defendant may appeal from "a final judgment of conviction"), section 1466, subdivision (b)(2) (a defendant may appeal from "any order made after judgment affecting his or her substantial rights"), section 1538.5, subdivision (m) (a defendant may seek review of an order denying a suppression motion "notwithstanding the fact that the judgment of conviction is predicated upon a plea of guilty"), and section 1538.5, subdivision (j) (authorizing the prosecution and the defense to appeal a ruling on a suppression motion prior to a misdemeanor trial).
*892*4It is clear that the first three provisions do not authorize defendant's appeal in light of our Supreme Court's decision in People v. Mazurette (2001) 24 Cal.4th 789, 791-796, 102 Cal.Rptr.2d 555, 14 P.3d 227 ( Mazurette ). To determine the applicability of the fourth cited statute ( § 1538.5, subd. (j) ), we are required to assess the statutory scheme of which it is a part, but the end result is the same, i.e., it is not a vehicle for a defendant who has been placed on DEJ to appeal the pre-plea denial of a suppression motion.
Mazurette
In Mazurette , our Supreme Court was faced with deciding "whether a criminal defendant granted a deferred entry of judgment can, immediately following his or her plea of guilty ..., appeal an adverse pretrial decision on a motion to suppress evidence ...." ( Mazurette , supra , 24 Cal.4th at p. 792, 102 Cal.Rptr.2d 555, 14 P.3d 227.) Although Mazurette's plea was to a felony, the issue is not unique to felonies and, for that reason, the same rationale used by the Supreme Court is applicable to misdemeanor appeals.
Those convicted of misdemeanors and felonies are expressly permitted by statute to appeal the judgment resulting from the conviction (§ 1237, subd. (a); 1466, subd. (b)(1)), as well as any postjudgment order affecting his or her substantial rights (§ 1237, subd. (b); 1466, subd. (b)(2)). If, however, the judgment is the result of a guilty plea, any appeal taken therefrom is limited to one based on " 'reasonable constitutional, jurisdictional, or other grounds going to the legality of the proceedings.' " (§ 1237.5, subd. (a) [felony limitation]; People v. Egbert (1997) 59 Cal.App.4th 503, 509, 68 Cal.Rptr.2d 913, quoting § 1237.5, subd. (a) [misdemeanor limitation] ). Because of this restriction, an appeal from a pre-plea denial of a suppression motion would normally be precluded. (See Mazurette , supra , 24 Cal.4th at p. 793, 102 Cal.Rptr.2d 555, 14 P.3d 227.) But, in section 1538.5, subdivision (m), the Legislature sidestepped the standard limitations placed on appeals following guilty pleas to expressly preserve a right to appeal in cases where a defendant whose judgment is predicated on a guilty plea seeks to challenge a pre-plea order denying a suppression motion. ( Mazurette , supra , 24 Cal.4th at pp. 793-794, 102 Cal.Rptr.2d 555, 14 P.3d 227, citing § 1538.5, subd. (m).) This drove Mazurette to consider a narrower question: Does section 1538.5, subdivision (m), authorize an appeal even if the guilty plea resulted in DEJ? ( Ibid . ) Mazurette provided the following reasoning in holding, under these circumstances, the statutory provision does not permit an appeal.
"[B]ecause [Mazurette] pleaded following denial of her suppression motion raising a claim of an illegal search, section 1538.5 [, subdivision] (m) would *5permit her to appeal from a final judgment of conviction. In defendant's case, however, the trial court, with her consent, deferred entry of judgment pursuant to section 1000.1. Accordingly, there is-as yet-no judgment from which defendant can appeal. If she successfully completes her rehabilitation, the charges will be dismissed and the slate wiped clean. If, instead, defendant fails to 'perform[ ] satisfactorily' in her assigned program, 'is not benefiting from education, treatment, or rehabilitation,' or engages in additional criminal behavior, 'the court shall render a finding of guilt to the charge or charges pled, enter judgment , and schedule a sentencing hearing as otherwise provided in this code.' (§ 1000.3, 3d par., italics added.) Only following entry of judgment pursuant to section 1000.3 will a judgment exist from which defendant can appeal." ( *893Mazurette , supra , 24 Cal.4th at pp. 793-794, 102 Cal.Rptr.2d 555, 14 P.3d 227.)
The rationale is equally applicable to misdemeanor cases, i.e., there is no judgment while a defendant is on DEJ, and there will be no judgment unless the defendant does not successfully complete the program. Because the triggering mechanism to an appeal under section 1538.5, subdivision (m), is "a judgment of conviction," the provision is inapplicable to a defendant on DEJ regardless of whether the defendant has pled guilty to a felony or a misdemeanor.2
Section 1538.5, subdivision (j)
What is unique to misdemeanors, and therefore not addressed in Mazurette , is found in the penultimate sentence of subdivision (j)'s lengthy text. It reads, "If the property or evidence seized relates solely to a misdemeanor complaint, and the defendant made a motion for the return of property or the suppression of evidence in the superior court prior to trial, both the people and defendant shall have the right to appeal any decision of that court relating to that motion to the appellate division, in accordance with the California Rules of Court provisions governing appeals to the appellate division in criminal cases."3 ( § 1538.5, subd. (j).)
*6" ' " 'As in any case involving statutory interpretation, our fundamental task here is to determine the Legislature's intent so as to effectuate the law's purpose. [Citation.] We begin by examining the statute's words, giving them a plain and commonsense meaning.' " ' [Citation.] '[W]e consider the language of the entire scheme and related statutes, harmonizing the terms when possible.' [Citations.]" ( People v. Gonzalez (2017) 2 Cal.5th 1138, 1141, 218 Cal.Rptr.3d 150, 394 P.3d 1074.)
Subdivision (j) does not specifically address whether the referenced right to appeal exists even if a defendant has entered a guilty plea and been granted DEJ. If we were to adopt the literal meaning of the statutory language, we would be mandated to hold that a defendant on DEJ is not barred from pursuing such an appeal. But, the literal meaning of words in a statute does not necessarily dictate its subsequent application ( California School Employees Assn. v. Governing Board (1994) 8 Cal.4th 333, 339-340, 33 Cal.Rptr.2d 109, 878 P.2d 1321 ) and, under the circumstances presented here, a literal interpretation of the language would be inconsistent with the purpose of section 1538.5.
"[A]lthough the words used by the Legislature are the most useful guide to its intent, we do not view the language of the statute in isolation. [Citation.] Rather, we construe the words of the statute in context, keeping in mind the statutory purpose. [Citation.] We will not follow the plain meaning of the statute "when to do so would 'frustrate[ ] the manifest purposes of the legislation as a whole or [lead] to absurd results.' " [Citation.] Instead, we *894will " 'interpret legislation reasonably and ... attempt to give effect to the apparent purpose of the statute.' " ' [Citation.]" ( People v. Nelson (2011) 200 Cal.App.4th 1083, 1098, 132 Cal.Rptr.3d 856.)
Cases addressing the procedural objectives of section 1538.5 underscore the pretrial significance of the statute. "[T]he broad goal of the Legislature in enacting section 1538.5 was to provide an orderly and unified procedure for making pretrial challenges to the admission of evidence on the ground that it was the product of an unconstitutional search or seizure and obtaining prompt appellate review of the rulings of the lower courts on such challenges. [Citations.]" ( People v. Belleci (1979) 24 Cal.3d 879, 884, 157 Cal.Rptr. 503, 598 P.2d 473, italics added.) " Section 1538.5 provides a comprehensive and exclusive procedure for the final determination of search and seizure issues prior to trial . Its enactment was chiefly aimed at redressing defects identified in the previously existing procedures: (i) the unnecessary expenditure of time and effort in allowing repeated challenges to the legality of a search or seizure during the course of a criminal proceeding; (ii) the waste of jury time *7in permitting search and seizure questions to be raised during trial, since the determination of these issues takes place outside the presence of the jury; and (iii) the lack of adequate opportunity for the prosecution to obtain appellate review of an adverse decision on a search and seizure question before trial commences and jeopardy attaches. [Citations.]" ( People v. Brooks (1980) 26 Cal.3d 471, 475-476, 162 Cal.Rptr. 177, 605 P.2d 1306, italics added.) In other words, " section 1538.5 was enacted largely for the purpose of settling troublesome questions of the admissibility of evidence before trial ." ( Cornelius v. Superior Court (1972) 25 Cal.App.3d 581, 585, 102 Cal.Rptr. 59, italics added; see also Moreno v. Superior Court (1978) 80 Cal.App.3d 932, 935, 146 Cal.Rptr. 35.)
Section 1538.5 is premised on the prospect of a trial. It was enacted to streamline criminal proceedings by providing a mechanism to resolve search and seizure issues before a jury is summoned. Indeed, the language preceding the penultimate sentence of subdivision (j) furthers that objective by specifying pretrial procedures applicable when a suppression motion is granted at the preliminary hearing.4
*895*8But, after a defendant is placed on DEJ, the prospect of a trial is no longer looming. (See People v. Ormiston (2003) 105 Cal.App.4th 676, 690, 129 Cal.Rptr.2d 567 ["Once a diversion order is entered, no trial or other criminal proceeding remains pending"].) " 'Under ... section 1000 et seq., eligible drug offenders may be considered for a diversion program in lieu of criminal prosecution . [Citation.] ... [Citation.]' [Citation.] 'The deferred entry of judgment statutes ... provide that first time drug offenders who meet specified conditions "bypass the normal criminal process and enter a drug treatment program." [Citation.]' [Citations.] Not only are criminal proceedings suspended, but 'the accused is required to enter a guilty plea, and formal judgment is deferred.' [Citations.] If diversion is successfully completed, the charges are dismissed and the defendant is spared 'the stigma of a criminal record.' [5 ][Citations.]" ( Ibid ., italics added.)
Defendant opted to circumvent the typical progression of criminal proceedings not only to achieve rehabilitation but also to have his case ultimately dismissed. He does not face the prospect of a trial and, at this juncture, he is not subject to the shame associated with a judgment of conviction. To allow an appeal of an order denying defendant's suppression motion when there is no pending criminal prosecution does not promote the primary objectives of section 1538.5 to (a)"reduce the waste of unnecessary court time in resolving search and seizure questions ..." ( People v. Sherwin (2000) 82 Cal.App.4th 1404, 1409, 98 Cal.Rptr.2d 888, citing People v. Superior Court (Edmonds) (1971) 4 Cal.3d 605, 610, 94 Cal.Rptr. 250, 483 P.2d 1202 ), and (b) facilitate an orderly and efficient trial by resolving issues regarding the constitutionality of searches and/or seizures before a jury is summoned ( Cornelius v. Superior Court , supra , 25 Cal.App.3d at p. 585, 102 Cal.Rptr. 59 ).
It is not appropriate to interpret subdivision (j) in a way that frustrates the overriding purposes of section 1538.5. "In the end, we ' "must select the construction that comports most closely with the apparent intent of the Legislature, with a view to promoting rather than defeating the general purpose of the statute, and avoid an interpretation that would lead to absurd consequences." [Citation.]' [Citation.]" ( Torres v. Parkhouse Tire Service, Inc. (2001) 26 Cal.4th 995, 1003, 111 Cal.Rptr.2d 564, 30 P.3d 57.) We hold subdivision (j) does not give a defendant the right to appeal the denial of a suppression motion if he or she subsequently enters a guilty plea and is granted DEJ. Rather, *896that provision is applicable only when the defendant is faced with the prospect of a trial. *9DISPOSITION
The appeal is dismissed.
We concur:
RICCIARDULLI, J.
RICHARDSON, J.
All further statutory references are to the Penal Code.
The same holds true for section 1466, subdivisions (b)(1) and (b)(2), as both provisions require judgment to have been entered.
The language used in the original version of subdivision (j) was different only in the sense that it accounted for the 1967 hierarchy of the courts. As originally enacted, the pertinent portion of subdivision (j) read: "If the property or evidence seized relates to a misdemeanor offense, and the defendant made a motion for the return of property or the suppression of evidence in the municipal court or justice court prior to trial, both the people and defendant shall have the right to appeal any decision of that court to the superior court of the county in which such inferior court is located, in accordance with the California Rules of Court provisions governing appeals from municipal and justice courts in criminal cases." (Former § 1538.5, subd. (j), added by Stats. 1967, ch. 1537, § 1, p. 3652.)
The language preceding the last two sentences is:
"(j) If the property or evidence relates to a felony offense initiated by complaint and the defendant's motion for the return of the property or suppression of the evidence at the preliminary hearing is granted, and if the defendant is not held to answer at the preliminary hearing, the people may file a new complaint or seek an indictment after the preliminary hearing, and the ruling at the prior hearing shall not be binding in any subsequent proceeding, except as limited by subdivision (p). In the alternative, the people may move to reinstate the complaint, or those parts of the complaint for which the defendant was not held to answer, pursuant to Section 871.5. If the property or evidence relates to a felony offense initiated by complaint and the defendant's motion for the return or suppression of the property or evidence at the preliminary hearing is granted, and if the defendant is held to answer at the preliminary hearing, the ruling at the preliminary hearing shall be binding upon the people unless, upon notice to the defendant and the court in which the preliminary hearing was held and upon the filing of an information, the people, within 15 days after the preliminary hearing, request a special hearing, in which case the validity of the search or seizure shall be relitigated de novo on the basis of the evidence presented at the special hearing, and the defendant shall be entitled, as a matter of right, to a continuance of the special hearing for a period of time up to 30 days. The people may not request relitigation of the motion at a special hearing if the defendant's motion has been granted twice. If the defendant's motion is granted at a special hearing, the people, if they have additional evidence relating to the motion and not presented at the special hearing, shall have the right to show good cause at the trial why the evidence was not presented at the special hearing and why the prior ruling at the special hearing should not be binding, or the people may seek appellate review ..., unless the court, prior to the time the review is sought, has dismissed the case pursuant to Section 1385. If the case has been dismissed pursuant to Section 1385, ... after the special hearing, the people may file a new complaint or seek an indictment after the special hearing, and the ruling at the special hearing shall not be binding in any subsequent proceeding, except as limited by subdivision (p)." (§ 1538.5, subd. (j).) The last sentence of the provision simply explains the implications of appellate or writ review: "If the people prosecute review by appeal or writ to decision, or any review thereof, in a felony or misdemeanor case, it shall be binding upon them." (Ibid.)
"A defendant's plea of guilty pursuant to [the DEJ statute] shall not constitute a conviction for any purpose unless a judgment of guilty is entered [following a finding of unsatisfactory performance on DEJ]." (§ 1000.1, subd. (d).)