What does the project do?
The project has been designed to help contributors obtain certain metrics on their nodes.
Key features
- Estimated playback time: Provides an estimate of the time required to play content.
- Number of images: Counts the number of images used, including decorative and background images.
- Title structure validation: Checks the validity of title structures and their depth.
Project link
https://www.drupal.org/project/text_clarity_checker
Comments
Comment #2
avpadernoComment #3
avpadernoThank you for applying!
Please read Review process for security advisory coverage: What to expect for more details and Security advisory coverage application checklist to understand what reviewers look for. Tips for ensuring a smooth review gives some hints for a smoother review.
The important notes are the following.
To the reviewers
Please read How to review security advisory coverage applications, Application workflow, What to cover in an application review, and Tools to use for reviews.
The important notes are the following.
For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues.
Comment #4
avpadernoRemember to change status, when the project is ready for review, as in this queue Active means Don't review yet the project I am using for this application.
Comment #5
avpadernoComment #6
pcharratComment #7
vishal.kadam1. The
masterbranch is not used on drupal.org. The only exception is for the main branch, which is actually not fully supported on drupal.org and should be avoided. For now, the branch names must follow what is reported in Release branches.2. FILE: text_clarity_checker.info.yml
package: CustomThis line is used by custom modules created for specific sites. It is not a package name used for projects hosted on drupal.org.
3. FILE: README.md
The README file is missing the required sections - Project name, Requirements, and Configuration.
Comment #8
pcharratComment #9
pcharratIn 1.3.4 version, I add GenericTest and updated hook_help.
Comment #10
rushikesh raval commentedI am changing the issue priority as per issue priorities.
Comment #11
avpadernosrc/Form/TextClarityCheckerSettingsForm.php
ConfigFormBase::__construct()needs to be called. Since its parameters changed in Drupal 10.2, the project cannot be compatible with all the Drupal 10 releases and Drupal 11; it needs to require at least Drupal 10.2.With Drupal 10 and Drupal 11, there is no longer need to use
#default_valuefor each form element, when the parent class isConfigFormBase: It is sufficient to use#config_target, as in the following code.Using that code, it is no longer needed to save the configuration values in the form submission handler: The parent class will take care of that.
Furthermore, block plugins do not need an external class for their setting form: They return it in their
blockForm()method.src/ProxyConfig.php
The short description must use a verb declined to the third person singular.
Drupal code does not use
@property. The values returned by__get()need to be documented in its documentation comment.That class is not used by the project, which means it should be removed.
Comment #12
pcharratThank you for your feedback.
I have revised the architecture by moving the parameters directly into the block, which allows for multiple instances with different configurations depending on user roles. This approach is more in line with Drupal best practices and offers greater flexibility of use.
I have upgraded from version 1.3 to 1.4.
Comment #13
pcharratComment #14
bbu23Hi! Quick note: you don't need to tag a new release after every feedback. We're reviewing directly the branch specified in the title of the ticket, in this case
1.4.x.It is better not to create new releases during these applications, since a review could ask for a change that is not backward compatible with the existing releases. Just using a development version avoids those BC issues.
Comment #15
avpadernoIt would also be better not to create new branches: Reviewers could need to check again all the files, to understand which changes has been done in the new branch.
Comment #16
avpadernoconfig
Since the settings form has been removed, the config directory should be removed too: Without a configuration object used by the project, there is no need to define its default values, nor its schema.
tests/src/Functionnal/GenericTest.php
The correct directory is test/src/Functional.
text_clarity_checker.module
For a new module that aims to be compatible with Drupal 10 and Drupal 11, I would rather implement hooks as class methods as described in Support for object oriented hook implementations using autowired services.
It would require increasing the minimum Drupal 10 version supported, but Drupal 10.1 is no longer supported.
Comment #17
pcharratThank you for your feedback.
Comment #18
pcharratComment #19
bbu23Comment #20
bbu23Hi! Below you have my feedback:
- There is no dev release. While not mandatory, it's a highly encouraged practice in the Drupal community.
-
text_clarity_checker.info.yml:The translations folder and locale keys should be removed since they are intended for custom modules as described in
locale.api.php. Consider contributing the translations for your module to drupal.org. See Contribute to translations.- The namespace of the Object Oriented hook classes is wrong: it should be
Drupal\text_clarity_checker\Hookinstead ofDrupal\text_clarity_checker\Hooks. See changelog. The hooks are still called because of the.moduleprocedural hooks that are kept for backwards compatibility. You can disable procedural hooks for Drupal 11+ optionally by setting the following in your services YAML file:-
src/Plugin/Block/TextClarityCheckerBlock.php: Is there a reason why your block is uncacheable?Comment #21
bbu23And since your module already has a logo, I suggest moving the image to the repository to make it compatible with Project Browser and having the icon show next to the module title. In the place of the image you could upload screenshots of the functionality or leave it empty.
See Logo in Project Browser.
Comment #22
pcharratThank you for your comments. I have adapted my hooks to the requirements of Drupal 11.
Comment #23
pcharratComment #24
vishal.kadamI am changing priority as per Issue priorities.
Comment #25
avpadernoThank you for your contribution and for your patience with the review process!
I am going to update your account so you can opt into security advisory coverage any project you create, including the projects you already created.
These are some recommended readings to help you with maintainership:
You can find more contributors chatting on Slack or IRC in #drupal-contribute. So, come hang out and stay involved!
Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
I thank also all the reviewers for helping with these applications.
Comment #26
avpadernoComment #28
pcharratThank you for your time and feedback. It was very interesting.