Below are the few things I found which can help to reduce rejection and pass EQP process.
#Module Checks:
- Keep Your vendor name same as Vendor Name of your Marketplace account
- Create your extension with
developer
mode enabled - Must have composer.json in root folder of extension Eg. app/code/Vendor/Module/composer.json" with correct configurations and dependencies
- Must have registration.php in root folder of extension Eg. app/code/Vendor/Module/registration.php"
#Code 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:
- Check extension functionality with Magento compilation
php bin/magento setup:di:compile
- Check compatibility with
production
mode enabled - Test with cache enabled and disabled
- Validate your package e.g.
php validate_m2_package.php my-theme.zip my-module.zip
- Check coding standard with
phpcs
E.g.$ vendor/bin/phpcs /path/to/your/extension --standard=MEQP2 --severity=10
- Do Complete Testing of your code. Execute command
bin/magento dev:tests:run
More Reference
#Content and Description Checks:
- Do not use Magento logo in your documents or images
- Do not use "Product Box Image" as extension main image
- Add proper description for your extension functionality
- Correct grammatical errors (punctuation, capitalization, word usage, etc). Remember to use "a","an", and "the" correctly. Make sure words are plural when necessary. Be sure words that should be past tense are past tense.
- Check and confirm you do not have any broken link in your document or description content.
- Do not add links of other extensions/services in description content. Promoting services or other created extensions in Magento Marketplace or Magento Connect is prohibited.
#Other:
- Submit an e-copy of your Tax Forms to [email protected] (Required only if you are selling paid extensions)
Keeping the practice of following above standards will surely improve extension quality.