Description

Metatag AI is a fork of the Open AI Metadata project. The configuration settings is the same, with the key distinction is that it utilizes the Metatag Module.

Project link

https://www.drupal.org/project/metatag_ai

Comments

nx2611 created an issue. See original summary.

vishal.kadam’s picture

Thank 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.

  • If you have not done it yet, you should run phpcs --standard=Drupal,DrupalPractice on the project, which alone fixes most of what reviewers would report.
  • For the time this application is open, only your commits are allowed.
  • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application and no other user will be able to opt projects into security advisory policy.
  • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

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.

  • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
  • Reviewers should show the output of a CLI tool only once per application.
  • It may be best to have the applicant fix things before further review.

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.

mattixonix’s picture

Status: Needs review » Needs work

Hi @Rachel Jaro, here are few tips from me:

  • You should remove LICENCE file, because it is generated automatically
  • You can create headers in README base on this doc - https://www.drupal.org/docs/develop/managing-a-drupalorg-theme-module-or...
  • In metatag_ai.routing.yml you can remove options with _admin_route: TRUE, because everything is behind /admin path is using administration theme
  • In metatag_ai.routing.yml you are using permissions but they are not declared, do this in newly created metatag_ai.permissions.yml file. In current situation, the admin can only use this module
  • In info.yml file you can't use package: Custom, rename it proper
  • In composer.json you should rename your module to "drupal/metatag_ai", because your package is on Drupal repository. "type" is not custom module but contrib now so "type" should be "drupal-module" also licence is required and in info.yml you require module metatag so in require section add this module (in composer.json). Remove empty require-dev. More info how to write proper composer.json here - https://www.drupal.org/docs/develop/using-composer/add-a-composerjson-file
  • In .module file i suggest to add types in functions arguments and return types. In metatag_ai_form_alter description beyond hook implementation you should add your description why you used this hook
  • In src folders files you should also add return and arguments types of functions, your code will more stable then. Properties also should be typed.
  • In GenerateMetatag.php use Dependency Injection. Whenever there is OOP code you have to always use DI, more info here https://www.drupal.org/docs/drupal-apis/services-and-dependency-injectio...
  • In GenerateMetatag.php:90 you are using service. Inject this through DI and use as property eg.: $this->state_config
  • Remove validateForm() from MetatagAISettingsForm.php this method is not required and it's empty.
  • In MetatagAIConfigForm:95 you have translated string, but it is broke after word "the", avoid this, because in translation page you will see /n i think and it is not correct.

Also fix those errors from phpcs

FILE: /opt/drupal/web/modules/custom/metatag_ai/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
  1 | WARNING | Line exceeds 80 characters; contains 335 characters
  7 | WARNING | Line exceeds 80 characters; contains 111 characters
  8 | WARNING | Line exceeds 80 characters; contains 120 characters
 10 | WARNING | Line exceeds 80 characters; contains 95 characters
 11 | WARNING | Line exceeds 80 characters; contains 85 characters
 16 | WARNING | Line exceeds 80 characters; contains 162 characters
 18 | WARNING | Line exceeds 80 characters; contains 177 characters
----------------------------------------------------------------------

A lot of work before You, but i wish luck with that ;)

avpaderno’s picture

The LICENSE file is not generated in any drupal.org Git repository. It is not a mandatory file, but it can be left, as long as the license is the same used by Drupal core.

mattixonix’s picture

Good to know @apaderno. Then @Rachel Jaro, You should rename LICENCE to LICENCE.txt because currently i downloaded module with those two files.

nx2611’s picture

Status: Needs work » Needs review

Thank you for your feedback! I have made updates to the module to address all the points you mentioned in your review.



You should remove LICENCE file, because it is generated automatically

- Removed since this is not a requirement.

avpaderno’s picture

Assigned: Unassigned » avpaderno
Status: Needs review » Reviewed & tested by the community

Thank you for your contribution! I am going to update your account.

These are some recommended readings to help with excellent maintainership:

You can find more contributors chatting on the Slack #contribute channel. So, come hang out and stay involved.
Thank you, also, for your patience with the review process.
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 all the reviewers.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.