-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make remaining modules (all Site Health) part of Performance Lab core #1029
Comments
I would propose the following implementation:
@mukeshpanchal27 @joemcgill @thelovekesh Let me know what you think. |
@felixarntz Makes sense to me. The only thing I would like to request is to limit the PL core code to a specific directory maybe the top level - includes(or src)
- admin
- site-health
- server-timing
- plugins
- tests
//...other config files/dirs |
@thelovekesh I like that idea, let's do it. I'd say |
I agree with the folder structure @thelovekesh is proposing here. Here are the 3 directories in modules with site health checks:
I don't think we need to have separate files folders for each check, nor do we need 4 files for each check. I would do something like this:
|
@joemcgill I disagree with putting the Site Health checks all in one folder. They should still be kept standalone, and separate folders encourage that. We may merge individual checks to core, not all at once. Putting them in distinct files limits us to only using one file per check, which is not always a good idea, particularly for more complex checks. For those reasons, I think separate folders per check is a more maintainable and scalable option. We can handle the files within however we want, but I think separate folders and a single entry point file to load for each check are crucial. |
We can keep them in separate folders, if you prefer. I mainly am suggesting that we simplify the structure of the files now that we don't need to follow the previous architecture intended for more complex modules. For example, in each of our current health checks, the functionality from the can-load.php, helper.php, and hooks.php can all be part of the same file. Given that each check at that point will be a single file per folder, each of them can be loaded by the main site-health entry file, If part of the goal is to write these health checks in a way that can easily be ported to WP Core, then it's also useful to keep in mind that most health checks in core are simply executed via a method on the |
Right, I'm not opposed to combining logic into a single file per check, where that makes sense. I just think we should not confine ourselves to having to do that, as some checks may require supplemental functionality - for instance the In other words, as long as we put the Site Health checks each into their own folder, the rest can be decided on a case by case basis I think. |
As recently discussed (also see #911 (comment)), the concept of modules will be entirely removed as part of the 3.0.0 release.
At this point, all features are already moved to standalone plugins exclusively, except for the Site Health modules where this was an explicit design decision, to keep features that don't directly enhance performance part of Performance Lab. This philosophy remains, with a slight adjustment of no longer using modules:
Any features that directly enhance performance should be standalone plugins.
Any features that don't directly enhance performance (such as measurement features or recommendations like Site Health) should be part of Performance Lab core.
Site Health checks should continue to remain part of Performance Lab. However, going forward, this should no longer be in the form of modules, but simply as part of Performance Lab core. This means:
The text was updated successfully, but these errors were encountered: