[wp-trac] [WordPress Trac] #60457: Plugin Dependencies: Running update_option within wp-settings can be catastrophic for a high traffic site
WordPress Trac
noreply at wordpress.org
Sun Feb 18 15:53:49 UTC 2024
#60457: Plugin Dependencies: Running update_option within wp-settings can be
catastrophic for a high traffic site
-------------------------------------------------+-------------------------
Reporter: dd32 | Owner: costdev
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 6.5
Component: Plugins | Version: trunk
Severity: normal | Resolution:
Keywords: dev-feedback has-patch has-unit- | Focuses:
tests needs-testing has-testing-info | performance
-------------------------------------------------+-------------------------
Changes (by costdev):
* keywords: dev-feedback has-patch has-unit-tests needs-testing => dev-
feedback has-patch has-unit-tests needs-testing has-testing-info
Comment:
== Testing Instructions
These steps define how to test the patch, and indicate the expected
behavior.
=== Setup
1. Apply [https://github.com/WordPress/wordpress-develop/pull/6123 the
PR].
2. Run `npm run build:dev` to build the environment.
=== Steps to Test
1. Navigate to `Plugins > Add New` and search for **WPSSO Product
Metadata**.
2. Look at the plugin card for **WPSSO Product Metadata**.
- **Expected results**:
a. The "Install Now" button should be disabled.
b. The card should contain a notice that additional plugins are
required, with two plugins listed and a "More details" link for each.
3. Click the "More details" link below the "Install Now" button.
- **Expected result**: You should see that the "Install Now" button at
the bottom of the modal is disabled.
4. Click the "More details" link beside the first required plugin.
- **Expected result**: You should see that the "Install Now" button is
enabled.
5. Click the "Install Now" button.
- **Expected results**:
a. The button should change to "Installing..." with a loading circle.
b. After a few moments, the button should change to "Installed!", then
change to an enabled "Activate" button.
6. Click the "Activate" button.
- **Expected result**: It should change briefly to "Activating..." with
a loading circle, then to a disabled "Active" button.
7. Close the modal and repeat steps 4-6 for the second required plugin.
- **Expected results**:
a. You should see that the "Install Now" button is enabled.
b. The button should change to "Installing..." with a loading circle.
c. After a few moments, the button should change to "Installed!", then
change to an enabled "Activate" button.
d. It should change briefly to "Activating..." with a loading circle,
then to a disabled "Active" button.
8. Close the modal for the second required plugin.
- **Expected result**: The "Install Now" button for the **WPSSO Product
Metadata** plugin should still be disabled.
9. Click the "More details" link below the "Install Now" button for
**WPSSO Product Metadata**.
- **Expected result**: You should see the "Install Now" button is
enabled.
10. Close the modal and refresh the page.
- **Expected result**: You should see that the "Install Now" button for
**WPSSO Product Metadata** is now enabled.
11. Click the "Install Now" button.
- **Expected results**:
a. It should change to "Installing..." with a loading circle.
b. After a few moments, the button should change to "Installed!", then
change to an enabled "Activate" button.
12. Click the "Activate" button.
- **Expected result**: It should change briefly to "Activating..." with
a loading circle, then to a disabled "Active" button.
13. Navigate to `Plugins > Installed plugins`.
- **Expected results**:
a. You should see that **WPSSO Product Metadata** and the two required
plugins are active.
b. The checkbox for the two required plugins should be disabled.
c. The required plugins should have a disabled "Deactivate" action.
d. The required plugins should have a "Required by:" line in their
description with the **WPSSO Product Metadata** plugin included.
e. The required plugins should have a "Note:" that says they cannot be
deactivated or deleted until the plugins that require them are deactivated
and deleted.
f. The checkbox for **WPSSO Product Metadata** should be enabled.
g. The "Deactivate" action for **WPSSO Product Metadata** should be
enabled.
h. **WPSSO Product Metadata** should have a "Requires:" line in its
description with the two required plugins listed as links.
14. Click each of the required plugins links.
- **Expected result**: The required plugin links should open a modal
that shows that plugin's information, and at the bottom should be a
disabled "Active" button.
15. Close the modal.
- **Expected result**: In the description for **WPSSO Product
Metadata**, there should also be a "Note:" that says it cannot be
activated until the plugins that require it are activated.
16. Click "Deactivate" for **WPSSO Product Metadata**.
- **Expected result**: When the page reloads, the "Deactivate" action
for the two required plugins should now be enabled.
17. Click "Deactivate" for each of the two required plugins.
- **Expected result**: When the page reloads, the "Delete" action for
the two required plugins should be disabled.
18. Open `wp-content/plugins` and delete the folder for one of the
required plugins.
19. Refresh the page.
- **Expected results**:
a. There should be a notice saying that required plugins are missing.
b. **WPSSO Product Metadata** should still be active.
c. The "Delete" action for the remaining required plugin should still
be disabled.
d. The "Delete" action for **WPSSO Product Metadata** should be
enabled.
20. Click the "Delete" action for **WPSSO Product Metadata**.
- **Expected result**: **WPSSO Product Metadata** should delete
successfully.
21. Refresh the page.
- **Expected result**: The "Delete" action for the remaining required
plugin should be enabled.
22. Click the "Delete" action for the remaining required plugin.
- **Expected result**: The remaining required plugin should delete
successfully.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60457#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list