wp-media / wp-media/imagify-plugin

Allow To Be Over Quota Not Working Properly For Sub-accounts

Open
#648 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
82
Forks
31
Avg merge
5d 10h
Merged PRs (30d)
9

Description

Describe the bug
If a sub-account has used less than its allowed quota amount and bulk optimization is started, then things work as expected and it allows bulk optimization to continue in excess of the allowed quota amount. But if bulk optimization is stopped and the sub-account is already over the allowed quota amount, and you then try to start bulk optimizing again, you get the overquota alert and bulk optimization is not possible.

To Reproduce

  1. Enter a sub-account's API Key in Imagify plugin settings page
  2. Set the sub-account's quota amount to a low number and make sure it's used it all
  3. Enable the "Allow to be over quota" setting for the sub-account
  4. Try to start Bulk Optimization and you will get the "Out of quota" popup message

Expected behavior
Bulk optimization should be allowed to start when the "Allow to be over quota" setting is enabled, whether the sub-account is already over its allowed quota amount or not.

Additional context
In this scenario, optimization is still allowed to happen individually from within the Media Library (even when the sub-account is already over its limit).

Here is the case where this was happening for one of our users. I was also able to reproduce the issue on my test site.

Backlog Grooming (for WP Media dev team use only)

  • Reproduce the problem
  • Identify the root cause
  • Scope a solution
  • Estimate the effort

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue from the Imagify plugin settings page with a sub-account already over quota, then compare the bulk optimization flow with optimization from the WordPress Media Library. Trace where the “Allow to be over quota” setting is checked and confirm that bulk optimization can start in both quota states when enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.