Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.00ms] Passed 4 tests
Analyzing server-side resources used by Magento 2 WordPress Integration
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 42.75 ▼2.94 |
Dashboard /wp-admin | 3.31 ▲0.00 | 63.44 ▲10.10 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 46.01 ▼10.77 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 85.80 ▼14.92 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 37.22 ▲0.62 |
Server storage [IO: ▲1.30MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 154 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
An overview of browser requirements for Magento 2 WordPress Integration
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.16 ▲0.92 | 1.81 ▼2.92 | 46.30 ▼0.12 |
Dashboard /wp-admin | 2,195 ▲21 | 5.57 ▲0.07 | 97.23 ▲9.97 | 42.25 ▲0.98 |
Posts /wp-admin/edit.php | 2,097 ▼0 | 1.96 ▼0.03 | 35.38 ▼3.11 | 34.76 ▲0.03 |
Add New Post /wp-admin/post-new.php | 1,526 ▼0 | 23.23 ▲0.28 | 676.98 ▼20.74 | 61.76 ▼1.63 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.20 ▼0.03 | 100.44 ▼2.86 | 43.27 ▼2.35 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
- 5× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/m2wp/include/classes/widgets/M2I_Product_Widget.php
- > /wp-content/plugins/m2wp/include/classes/widgets/M2I_Block_Widget.php
- > /wp-content/plugins/m2wp/include/classes/widgets/M2I_Slider_Widget.php
- > /wp-content/plugins/m2wp/include/classes/widgets/M2I_Cart_Widget.php
- > /wp-content/plugins/m2wp/include/classes/widgets/M2I_Abstract_Widget.php
- 64× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Tests/Node/ClassNodeTest.php:17
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Tests/Node/CombinedSelectorNodeTest.php:17
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Exception\\ExceptionInterface' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Exception/ParseException.php:22
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\CssSelector\\Tests\ode\\AbstractNodeTest' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Tests/Node/AttributeNodeTest.php:17
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Parser/Parser.php:28
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/XPath/Extension/NodeExtension.php:28
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/m2wp/samples/twentyseventeen-child-m2i/functions.php:15
- > PHP Fatal error
Uncaught Error: Class 'Symfony\\Component\\CssSelector\\XPath\\Extension\\AbstractExtension' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/XPath/Extension/HtmlExtension.php:29
- > PHP Fatal error
Uncaught Error: Interface 'Symfony\\Component\\CssSelector\\Parser\\ParserInterface' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Parser/Shortcut/ClassParser.php:29
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/m2wp/include/external/vendor/symfony/css-selector/Tests/Parser/Shortcut/EmptyStringParserTest.php:21
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== Magento 2 WordPress Integration ===
)
m2wp/magento2-integration.php 85% from 13 tests
The principal PHP file in "Magento 2 WordPress Integration" v. 1.4.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("m2wp.php" instead of "magento2-integration.php")
- Description: Keep the plugin description shorter than 140 characters (currently 226 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin12,375 lines of code in 137 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 111 | 2,240 | 5,700 | 9,823 |
JavaScript | 8 | 131 | 530 | 1,417 |
CSS | 8 | 45 | 51 | 371 |
HTML | 2 | 0 | 0 | 356 |
PO File | 1 | 83 | 95 | 246 |
JSON | 3 | 0 | 0 | 99 |
XML | 2 | 3 | 0 | 39 |
Markdown | 2 | 9 | 0 | 24 |
PHP code 50% from 2 tests
This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 653)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 17.44 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 765.00 |
Average method complexity | 4.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 653.00 |
Code structure | ||
---|---|---|
Namespaces | 16 | |
Interfaces | 6 | |
Traits | 0 | |
Classes | 90 | |
▷ Abstract classes | 5 | 5.56% |
▷ Concrete classes | 85 | 94.44% |
▷ Final classes | 0 | 0.00% |
Methods | 520 | |
▷ Static methods | 53 | 10.19% |
▷ Public methods | 442 | 85.00% |
▷ Protected methods | 45 | 8.65% |
▷ Private methods | 33 | 6.35% |
Functions | 95 | |
▷ Named functions | 72 | 75.79% |
▷ Anonymous functions | 23 | 24.21% |
Constants | 85 | |
▷ Global constants | 4 | 4.71% |
▷ Class constants | 81 | 95.29% |
▷ Public constants | 81 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.26MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/question.png | 7.98KB | 4.11KB | ▼ 48.46% |
img/exclam.png | 7.32KB | 3.89KB | ▼ 46.93% |
img/success.png | 6.32KB | 3.91KB | ▼ 38.17% |
samples/twentyseventeen-child-m2i/screenshot.png | 103.43KB | 41.12KB | ▼ 60.25% |
samples/genesis-child-m2i/screenshot.png | 126.30KB | 51.45KB | ▼ 59.26% |