If your proposed code changes do not fix a bug but introduces a new feature instead, speak first to the maintainers to make sure that your idea is in the project scope and that your proposed technical approach is the optimal solution[1]. This will save you time and potential disappointment.

Test your changes in your development environment to make sure there are no compilation errors or test failures. If you have not tested your patch for some reason, explicitly say so in a comment in Gerrit. Consider going through the Pre-commit checklist.

Avoid providing incomplete fixes or introducing new bugs. If you know that your patch needs more work, explicitly say so in Gerrit by reviewing it as "-2" or adding a "[WIP]" prefix to the commit message.

Small, independent, complete patches are more likely to be accepted.[2][3] The more files there are to review in your patch, the more time and effort a review will take[4] and the more likely several a larger number of review iterations will be needed[5].

If your commits are going to be touching separate files and there's not a lot of dependency between them, it's probably best to keep them as smaller discrete commits.

Furthermore, make sure to not include unnecessary changes in your patch[1] (e.g. fixing the coding style).

When rebasing, only rebase. If non-rebase changes are made inside a rebase changeset, you have to read through a lot more code to find it and it's non-obvious. When you're making a real change, leave a Gerrit comment explaining your change, and revise your commit summary to make sure it's still accurate.

Check your Gerrit settings and make sure you're getting email notifications. If your code fails automated tests, or you got some review already, respond to it in a comment or resubmission.

(To see why automated tests fail, click on the link in the "failed" comment in Gerrit, hover over the failed test's red dot, wait for the popup to show, and then click "console output.")

Sometimes you'll receive reviews which you'll perceive as irrelevant, for instance merely cosmetic. Do not ignore such reviews but amend your patch to satisfy trivial requests: You may disagree, but discussing costs time and is more expensive than conceding a point.

In general: Be patient and grow. More experienced patch writers receive faster responses and also more positive ones.[5]

The choice of reviewers plays an important role on reviewing time. More active reviewers provide faster responses.[5]

Right after you commit, add one or two developers to the changeset as Reviewers. (These are requests – there's no way to assign a review to one specific person in Gerrit.) Experienced developers should help with this: if you notice an unreviewed changeset lingering, then please add reviewers. To find reviewers:

Check the main maintainers list, or the maintainers listed in the extension's page, to find who's currently maintaining that part of the code, or is in maintainer training.

Click the magnifying glass in the "Project" row of your gerrit patch. Now find other changesets in that repository: the people who write and review those changesets would be good candidates to add as reviewers. Or see who can approve your patch: click "Access" in the top navigation bar, click the link(s) in "Owner" rows, see the list of names.

Manpower in free and open source software projects is limited, and interests of developers may change. Some code repositories are more active and maintained and you will receive quicker reviews. Other areas have unclear maintainership or are even abandoned and you might have to wait for a long time.

You can check the latest activity in a code repository by looking at the "Recent Commits" list of the repository in Diffusion or via git log in your local checkout. To take over an abandoned project and become its maintainer, follow these steps.

If you think that your patch has been gone unnoticed for a longer time, feel free to bring up the problem on the #wikimedia-devconnect IRC channel.

Even if you have followed all recommendations, your patch might still require some rework (or in rare cases even get rejected).

Apart from what has been mentioned already there are more potential reasons (not all of them are equally decisive), such as a suboptimal solution when there is a more simple or efficient way, performance issues, security issues, improvable naming (e.g. of variables), integration conflicts with existing code, duplication of work, unintended (mis)use of the API, or proposed changes to internal APIs being considered too risky.[1]

Be aware that there is a mismatch of judgement: Patch reviewers often consider test failures, an incomplete fix, introducing new bugs, a suboptimal solution, and inconsistent docs way more decisive for rejecting a patch than patch authors.[1]