Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#56134 closed enhancement (fixed)

Site Health: If 0 active plugins (themes), they can't be "all up to date"

Reported by: presskopp's profile Presskopp Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.1 Priority: normal
Severity: normal Version:
Component: Site Health Keywords: has-testing-info has-patch needs-testing needs-unit-tests commit
Focuses: Cc:

Description

If 0 plugins are active it states:

Your site has 0 active plugins, and they are all up to date.

In my opinion we should strip the "up to date" part in that case.

Same for themes.

Attachments (1)

56134.diff (1.1 KB) - added by SergeyBiryukov 2 years ago.

Download all attachments as: .zip

Change History (12)

#1 @SergeyBiryukov
2 years ago

  • Component changed from Text Changes to Site Health
  • Milestone changed from Awaiting Review to 6.1

@SergeyBiryukov
2 years ago

#2 @SergeyBiryukov
2 years ago

  • Keywords has-patch added

#3 @costdev
2 years ago

  • Keywords needs-testing added

I wonder if: Your site does not have any installed themes.
might be better as: Your site does not have any themes installed.

The latter reads a little more natural to me, though it's a minor thing that I'm not precious about.

Nevermind - Just realised this would create a discrepancy with the other strings used.

The patch looks good to me! Adding needs-testing.

@Presskopp or @SergeyBiryukov, could you add some testing instructions and the has-testing-info keyword for the Test Team?

Last edited 2 years ago by costdev (previous) (diff)

#4 @Presskopp
2 years ago

Testing Instructions

These steps define how to test the feature or enhancement, and indicates the expected behavior or results.

Steps to Test

  1. Rename plugins folder and themes folder
  2. Open "Tools" > "Site Health"
  3. Open "Passed Tests" > "Your plugins are all up to date"
  4. Read "Your site has 0 active plugins, and they are all up to date."
  5. Open "recommended improvements"
  6. Open "Have a default theme available"
  7. Read "Your site has 0 installed themes, and they are all up to date."

Expected Results

Output:

  • ✅ Your site does not have any active plugins.
  • ✅ Your site does not have any installed themes.

#5 @Presskopp
2 years ago

  • Keywords has-testing-info added

#6 follow-up: @martin.krcho
2 years ago

  • Keywords needs-unit-tests added

@SergeyBiryukov, did you consider adding unit tests to the patch?

I can see that Tests_Site_Health tests cover only the site health check cron at the moment. Adding more specific tests will probably require considerable effort. Has this been already discussed somewhere?

#7 in reply to: ↑ 6 @SergeyBiryukov
2 years ago

Replying to martin.krcho:

@SergeyBiryukov, did you consider adding unit tests to the patch?

Thanks for bringing this up! Not really, I would for any functionality changes, but this is only a string change, so I don't think it requires unit tests.

I can see that Tests_Site_Health tests cover only the site health check cron at the moment. Adding more specific tests will probably require considerable effort. Has this been already discussed somewhere?

Yes, there's a ticket for that: #47880.

#8 @martin.krcho
2 years ago

Sounds good to me, @SergeyBiryukov. I will follow #47880 and see if I can help at some point.

#9 @Clorith
2 years ago

  • Keywords commit added

Quick and simple change, looks good to go.

#10 @SergeyBiryukov
2 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 53816:

Site Health: Improve the wording in plugin and theme version tests.

This displays a more appropriate message in case the site does not have any active plugins or installed themes.

Follow-up to [44986], [45099], [45336].

Props Presskopp, costdev, martin.krcho, Clorith, SergeyBiryukov.
Fixes #56134.

#11 @SergeyBiryukov
2 years ago

In 53817:

Coding Standards: Remove extra space in two conditionals.

This fixes WPCS errors in WP_Site_Health::get_test_plugin_version() and ::get_test_theme_version():

  • Expected exactly one space between closing parenthesis and opening control structure; " " found.
  • Expected 1 space(s) after closing parenthesis; found 2

Follow-up to [53816].

See #56134.

Note: See TracTickets for help on using tickets.