I have created a Magento 2 extension which I wanted to upload on Magento Marketplace.
When I tried to upload my extension it got rejected multiple times with one or the other reason. Due to this and multiple submission, my extension got rejected with below message from Magento.
For policy or quality reasons, after evaluating your submission, we have decided not continue our review of MY EXTENSION
Now Magento is not allowing to update and re-submit my extension.
I have checked and found Magento is using its EQP process for checking extensions uploaded to the Marketplace.
Which things I have to take care to make a Magento 2 extension Marketplace ready?
Best Answer
Below are the few things I found which can help to reduce rejection and pass EQP process.
Module Checks:
developer
mode enabledCode Checks:
Do not use
$_REQUEST
,$_POST
,$_GET
,$_FILE
directlyNever end class file with ending php tag
?>
Do not use
die()
orexit()
in your code.Do not use
// @codingStandardsIgnoreLine
or// @codingStandardsIgnoreFile
in codeRemove unnecessary code and comments
Use spaces for indentation
Check for code duplication Refer Use
ClassPreferences
and/or Magento 2'splugin
structure to avoid duplicating code.Add PHP DockBlock for your classes
Use proper DockBlock for each of your functions with parameters and return types.
It is better to use Service Contract approach for your module development.
Testing and Debugging:
php bin/magento setup:di:compile
production
mode enabledphp validate_m2_package.php my-theme.zip my-module.zip
phpcs
E.g.$ vendor/bin/phpcs /path/to/your/extension --standard=MEQP2 --severity=10
bin/magento dev:tests:run
More ReferenceContent and Description Checks:
Other:
Keeping the practice of following above standards will surely improve extension quality.