Benchmarks
Plugin footprint 81% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully
Server metrics [RAM: ▲10.32MB] [CPU: ▼231.90ms] 50% from 4 tests
Server-side resources used by AMP for WP - Accelerated Mobile Pages
Please have a look at the following items
- RAM: Total memory usage should be kept under 10MB (currently 18.74MB on /wp-admin/admin.php?page=amp_options&tab=31)
- Extra RAM: Extra memory usage must be kept under 5MB (currently 10.32MB on /wp-admin/admin.php?page=amp_options&tab=31)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 9.81 ▲6.30 | 110.10 ▲46.79 |
Dashboard /wp-admin | 15.41 ▲12.01 | 119.71 ▲71.88 |
Posts /wp-admin/edit.php | 15.09 ▲11.45 | 122.65 ▲75.60 |
Add New Post /wp-admin/post-new.php | 19.60 ▲12.63 | 186.72 ▼1,121.86 |
Media Library /wp-admin/upload.php | 14.82 ▲11.52 | 136.63 ▲104.39 |
AMP /wp-admin/customize.php?autofocus[panel]=amp_panel&return=http%3A%2F%2Fwp.com%2Fwp-admin%2F&customize_amp=1 | 18.02 | 145.07 |
Import / Export /wp-admin/admin.php?page=amp_options&tab=33 | 18.74 | 139.91 |
Design /wp-admin/admin.php?page=amp_options&tab=19 | 18.74 | 138.62 |
Settings /wp-admin/admin.php?page=amp_options&tab=2 | 18.74 | 138.61 |
Setup /wp-admin/admin.php?page=amp_options&tab=1 | 18.74 | 136.85 |
Documentation /wp-admin/admin.php?page=amp_options&tab=32 | 18.74 | 142.04 |
Extensions /wp-admin/admin.php?page=amp_options&tab=30 | 18.74 | 136.53 |
Widgets /wp-admin/widgets.php | 16.69 | 121.44 |
Menus /wp-admin/nav-menus.php | 14.86 | 110.26 |
Upgrade to Pro /wp-admin/admin.php?page=amp_options&tab=31 | 18.74 | 133.68 |
Server storage [IO: ▲17.45MB] [DB: ▲0.04MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 1,169 new files
Database: no new tables, 9 new options
New WordPress options |
---|
ampforwp_rewrite_flush_option |
widget_ampforwp_amp_code_widget |
ampforwp_cpt_generated_post_types |
ampforwp_plugin_info |
widget_recent-comments |
widget_recent-posts |
ampforwp_default_pages_to |
redux_builder_amp-transients |
redux_builder_amp |
Browser metrics 75% from 4 tests
This is an overview of browser requirements for AMP for WP - Accelerated Mobile Pages
A great user experience is important, so you should focus on the following
- Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 29,387 on /wp-admin/admin.php?page=amp_options&tab=2)
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 5,398 ▲1,672 | 20.77 ▲5.30 | 7.23 ▼1.05 | 2.52 ▼0.22 |
Dashboard /wp-admin | 4,469 ▲1,589 | 9.20 ▲2.72 | 198.99 ▲32.99 | 193.49 ▲8.95 |
Posts /wp-admin/edit.php | 4,252 ▲1,561 | 4.00 ▲0.57 | 116.83 ▲42.50 | 178.49 ▲10.55 |
Add New Post /wp-admin/post-new.php | 3,777 ▲2,142 | 22.98 ▲6.90 | 594.08 ▲84.91 | 241.70 ▲55.48 |
Media Library /wp-admin/upload.php | 3,253 ▲1,556 | 7.21 ▲1.47 | 182.58 ▲12.32 | 263.36 ▲36.49 |
AMP /wp-admin/customize.php?autofocus[panel]=amp_panel&return=http%3A%2F%2Fwp.com%2Fwp-admin%2F&customize_amp=1 | 8,573 | 20.43 | 654.46 | 243.39 |
Import / Export /wp-admin/admin.php?page=amp_options&tab=33 | 29,289 | 10.45 | 381.00 | 500.87 |
Design /wp-admin/admin.php?page=amp_options&tab=19 | 29,352 | 11.57 | 420.62 | 564.89 |
Settings /wp-admin/admin.php?page=amp_options&tab=2 | 29,387 | 11.45 | 391.00 | 527.66 |
Setup /wp-admin/admin.php?page=amp_options&tab=1 | 29,289 | 10.91 | 352.69 | 491.84 |
Documentation /wp-admin/admin.php?page=amp_options&tab=32 | 29,296 | 10.38 | 373.78 | 486.95 |
Extensions /wp-admin/admin.php?page=amp_options&tab=30 | 29,367 | 11.06 | 353.03 | 473.07 |
Widgets /wp-admin/widgets.php | 4,406 | 32.56 | 666.82 | 189.24 |
Menus /wp-admin/nav-menus.php | 3,869 | 4.25 | 137.73 | 162.24 |
Upgrade to Pro /wp-admin/admin.php?page=amp_options&tab=31 | 29,309 | 10.04 | 382.39 | 471.44 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.04MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- Zombie WordPress options were found after uninstall: 9 options
- redux_builder_amp-transients
- widget_recent-comments
- ampforwp_default_pages_to
- widget_ampforwp_amp_code_widget
- ampforwp_rewrite_flush_option
- redux_builder_amp
- ampforwp_plugin_info
- ampforwp_cpt_generated_post_types
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 3× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/accelerated-mobile-pages/install/assets/images/spinner.php
- > /wp-content/plugins/accelerated-mobile-pages/includes/vendor/css-parser/sabberworm/php-css-parser/tests/quickdump.php
- > /wp-content/plugins/accelerated-mobile-pages/templates/design-manager/swift/footer.php
- 82× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/css-parser/sabberworm/php-css-parser/tests/Sabberworm/CSS/ParserTest.php:13
- > PHP Fatal error
Uncaught Error: Class 'AmpProject\\Optimizer\\Configuration\\BaseTransformerConfiguration' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Configuration/AmpRuntimeCssConfiguration.php:17
- > PHP Fatal error
Uncaught Error: Class 'AMP_HTML_Utils' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/templates/single.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/back-compat/templates-v0-3/meta-time.php:3
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Optimizer\\Transformer' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Transformer/TransformedIdentifier.php:26
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/templates/meta-time.php:3
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Exception\\AmpCliException' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Exception/Cli/InvalidCommand.php:13
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Optimizer\\Exception\\AmpOptimizerException' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Exception/InvalidConfiguration.php:12
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Optimizer\\TransformerConfiguration' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Configuration/BaseTransformerConfiguration.php:17
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Optimizer\\Transformer' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Transformer/ServerSideRendering.php:40
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Screenshots: These screenshots need descriptions #12, #13, #14 in accelerated-mobile-pages/assets to your readme.txt
accelerated-mobile-pages/accelerated-moblie-pages.php 92% from 13 tests
The primary PHP file in "AMP for WP - Accelerated Mobile Pages" version 1.0.77.39 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("accelerated-mobile-pages.php" instead of "accelerated-moblie-pages.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin163,594 lines of code in 941 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 549 | 11,619 | 20,284 | 110,569 |
JavaScript | 209 | 6,137 | 4,616 | 32,589 |
CSS | 107 | 818 | 287 | 9,686 |
Sass | 52 | 625 | 60 | 5,588 |
SVG | 4 | 18 | 2 | 1,603 |
Markdown | 6 | 443 | 0 | 1,425 |
JSON | 5 | 184 | 0 | 1,034 |
LESS | 3 | 82 | 79 | 715 |
HTML | 5 | 45 | 3 | 330 |
Bourne Shell | 1 | 24 | 0 | 55 |
PHP code 50% from 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
- Method cyclomatic complexity should be reduced to less than 100 (currently 117)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 21.45 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 871.00 |
Average method complexity | 4.40 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 117.00 |
Code structure | ||
---|---|---|
Namespaces | 29 | |
Interfaces | 22 | |
Traits | 1 | |
Classes | 326 | |
▷ Abstract classes | 16 | 4.91% |
▷ Concrete classes | 310 | 95.09% |
▷ Final classes | 71 | 22.90% |
Methods | 2,118 | |
▷ Static methods | 318 | 15.01% |
▷ Public methods | 1,623 | 76.63% |
▷ Protected methods | 164 | 7.74% |
▷ Private methods | 331 | 15.63% |
Functions | 1,014 | |
▷ Named functions | 954 | 94.08% |
▷ Anonymous functions | 60 | 5.92% |
Constants | 649 | |
▷ Global constants | 24 | 3.70% |
▷ Class constants | 625 | 96.30% |
▷ Public constants | 625 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
161 compressed PNG files occupy 3.71MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/cache-icon.png | 1.46KB | 1.52KB | 0.00% |
images/bbp-icon.png | 1.83KB | 1.84KB | 0.00% |
images/messenger.png | 21.07KB | 23.03KB | 0.00% |
includes/vendor/amp/assets/images/placeholder-icon.png | 0.46KB | 0.24KB | ▼ 48.41% |
images/amplayouts.png | 0.70KB | 0.71KB | 0.00% |