Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲11.02MB] [CPU: ▲74.35ms] 50% from 4 tests
An overview of server-side resources used by AMP for WP - Accelerated Mobile Pages
Please take the time to fix the following items
- RAM: Total memory usage must be kept under 10MB (currently 19.68MB on /wp-admin/admin.php?page=amp_options&tab=32)
- Extra RAM: Try to keep extra memory usage under 5MB (currently 11.02MB on /wp-admin/admin.php?page=amp_options&tab=32)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 10.25 ▲6.79 | 81.34 ▲46.96 |
Dashboard /wp-admin | 16.11 ▲12.81 | 126.56 ▲80.26 |
Posts /wp-admin/edit.php | 15.63 ▲12.27 | 145.78 ▲97.81 |
Add New Post /wp-admin/post-new.php | 19.15 ▲13.27 | 179.81 ▲77.42 |
Media Library /wp-admin/upload.php | 15.43 ▲12.20 | 126.41 ▲92.76 |
Settings /wp-admin/admin.php?page=amp_options&tab=2 | 19.67 | 191.52 |
Design /wp-admin/admin.php?page=amp_options&tab=20 | 19.68 | 180.62 |
Documentation /wp-admin/admin.php?page=amp_options&tab=33 | 19.68 | 160.51 |
AMP /wp-admin/customize.php?autofocus[panel]=amp_panel&return=http%3A%2F%2Fwp.com%2Fwp-admin%2F&customize_amp=1 | 19.68 | 214.76 |
Import / Export /wp-admin/admin.php?page=amp_options&tab=34 | 19.68 | 166.16 |
Setup /wp-admin/admin.php?page=amp_options&tab=1 | 19.68 | 166.99 |
Extensions /wp-admin/admin.php?page=amp_options&tab=31 | 19.68 | 162.88 |
Upgrade to Pro /wp-admin/admin.php?page=amp_options&tab=32 | 19.68 | 181.31 |
Server storage [IO: ▲18.29MB] [DB: ▲0.05MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,182 new files
Database: no new tables, 11 new options
New WordPress options |
---|
redux_builder_amp |
db_upgraded |
ampforwp_default_pages_to |
redux_builder_amp-transients |
widget_theysaidso_widget |
can_compress_scripts |
widget_recent-comments |
widget_ampforwp_amp_code_widget |
ampforwp_plugin_info |
widget_recent-posts |
... |
Browser metrics Passed 4 tests
This is an overview of browser requirements for AMP for WP - Accelerated Mobile Pages
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,324 ▲1,577 | 13.29 ▼1.42 | 4.22 ▲2.40 | 35.65 ▼2.59 |
Dashboard /wp-admin | 3,682 ▲1,505 | 5.10 ▼0.57 | 101.70 ▲4.23 | 44.28 ▲4.37 |
Posts /wp-admin/edit.php | 3,594 ▲1,494 | 2.57 ▲0.55 | 47.86 ▲7.34 | 34.97 ▼0.03 |
Add New Post /wp-admin/post-new.php | 3,447 ▲1,912 | 22.15 ▼1.04 | 1,042.14 ▲439.17 | 63.71 ▲12.96 |
Media Library /wp-admin/upload.php | 2,889 ▲1,486 | 4.63 ▲0.49 | 97.59 ▼5.14 | 45.45 ▲0.90 |
Settings /wp-admin/admin.php?page=amp_options&tab=2 | 23,261 | 5.84 | 343.26 | 334.82 |
Design /wp-admin/admin.php?page=amp_options&tab=20 | 23,275 | 5.84 | 366.58 | 102.37 |
Documentation /wp-admin/admin.php?page=amp_options&tab=33 | 23,219 | 5.45 | 295.92 | 78.09 |
AMP /wp-admin/customize.php?autofocus[panel]=amp_panel&return=http%3A%2F%2Fwp.com%2Fwp-admin%2F&customize_amp=1 | 8,712 | 22.41 | 570.46 | 120.80 |
Import / Export /wp-admin/admin.php?page=amp_options&tab=34 | 23,219 | 5.53 | 313.49 | 103.63 |
Setup /wp-admin/admin.php?page=amp_options&tab=1 | 23,219 | 5.36 | 298.88 | 80.37 |
Extensions /wp-admin/admin.php?page=amp_options&tab=31 | 23,219 | 5.30 | 313.71 | 81.66 |
Upgrade to Pro /wp-admin/admin.php?page=amp_options&tab=32 | 23,219 | 5.41 | 290.68 | 77.40 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.06MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Zombie WordPress options were found after uninstall: 11 options
- db_upgraded
- ampforwp_default_pages_to
- can_compress_scripts
- widget_recent-comments
- theysaidso_admin_options
- widget_ampforwp_amp_code_widget
- redux_builder_amp-transients
- widget_theysaidso_widget
- redux_builder_amp
- widget_recent-posts
- ...
Smoke tests 25% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
- 3× PHP files output text when accessed directly:
- > /wp-content/plugins/accelerated-mobile-pages/install/assets/images/spinner.php
- > /wp-content/plugins/accelerated-mobile-pages/templates/design-manager/swift/footer.php
- > /wp-content/plugins/accelerated-mobile-pages/includes/vendor/css-parser/sabberworm/php-css-parser/tests/quickdump.php
- 82× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\RemoteGetRequest' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/RemoteRequest/StubbedRemoteGetRequest.php:15
- > PHP Fatal error
Uncaught Error: Class 'AmpProject\\Optimizer\\Configuration\\BaseTransformerConfiguration' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Configuration/RewriteAmpUrlsConfiguration.php:20
- > 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/RuleSet/DeclarationBlockTest.php:9
- > PHP Fatal error
Uncaught Error: Interface 'WillWashburn\\Stream\\StreamableInterface' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/includes/lib/fasterimage/Stream/Stream.php:11
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Optimizer\\Transformer' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Transformer/RewriteAmpUrls.php:60
- > PHP Fatal error
Uncaught Error: Call to undefined function absint() in wp-content/plugins/accelerated-mobile-pages/includes/vendor/amp/back-compat/templates-v0-3/style.php:66
- > PHP Fatal error
Uncaught Error: Class 'AmpProject\\Optimizer\\Configuration\\BaseTransformerConfiguration' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Configuration/PreloadHeroImageConfiguration.php:18
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Exception\\AmpException' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Exception/MaxCssByteCountExceeded.php:14
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/accelerated-mobile-pages/includes/options/redux-core/inc/welcome/views/about.php:2
- > PHP Fatal error
Uncaught Error: Interface 'AmpProject\\Optimizer\\Error' not found in wp-content/plugins/accelerated-mobile-pages/includes/vendor/tool/Optimizer/Error/CannotAdaptDocumentForSelfHosting.php:13
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following browser errors
- 7 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=amp_options&tab=32
- > Deprecation (warning) in unknown
/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 1 Listener added for a synchronous 'DOMSubtreeModified' DOM Mutation Event. This event type is deprecated (https://w3c.github.io/uievents/#legacy-event-types) and work is underway to remove it from this browser. Usage of this event listener will cause performance issues today, and represents a risk of future incompatibility. Consider using MutationObserver instead.
- > GET request to /wp-admin/customize.php?autofocus[panel]=amp_panel&return=http%3A%2F%2Fwp.com%2Fwp-admin%2F&customize_amp=1
- > Security (warning) in unknown
/?customize_changeset_uuid=61413c23-9d13-4a66-88b1-f63a035d4b93&customize_theme=twentytwentyone&customize_messenger_channel=preview-0 - An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that 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 main PHP script in "AMP for WP - Accelerated Mobile Pages" version 1.0.92 is automatically included on every request by WordPress
Please take the time to fix the following:
- Main file name: Name the main plugin file 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
Good job! No executable or dangerous file extensions detected178,253 lines of code in 953 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 551 | 11,869 | 20,418 | 124,013 |
JavaScript | 213 | 6,156 | 4,663 | 32,865 |
CSS | 109 | 903 | 293 | 9,853 |
Sass | 52 | 625 | 60 | 5,588 |
SVG | 4 | 18 | 2 | 1,603 |
Markdown | 6 | 469 | 0 | 1,593 |
JSON | 6 | 184 | 0 | 1,139 |
HTML | 7 | 126 | 12 | 815 |
LESS | 3 | 82 | 79 | 715 |
Bourne Shell | 1 | 24 | 0 | 55 |
XML | 1 | 0 | 0 | 14 |
PHP code 50% from 2 tests
An overview of cyclomatic complexity and code structure
These items need your attention
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 117)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.55 |
Average class complexity | 21.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 877.00 |
Average method complexity | 4.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 117.00 |
Code structure | ||
---|---|---|
Namespaces | 29 | |
Interfaces | 22 | |
Traits | 1 | |
Classes | 327 | |
▷ Abstract classes | 16 | 4.89% |
▷ Concrete classes | 311 | 95.11% |
▷ Final classes | 71 | 22.83% |
Methods | 2,126 | |
▷ Static methods | 324 | 15.24% |
▷ Public methods | 1,631 | 76.72% |
▷ Protected methods | 164 | 7.71% |
▷ Private methods | 331 | 15.57% |
Functions | 1,056 | |
▷ Named functions | 994 | 94.13% |
▷ Anonymous functions | 62 | 5.87% |
Constants | 652 | |
▷ Global constants | 26 | 3.99% |
▷ Class constants | 626 | 96.01% |
▷ Public constants | 626 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
162 PNG files occupy 3.73MB with 1.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/tick.png | 0.86KB | 0.90KB | 0.00% |
images/sd-icon.png | 0.82KB | 0.83KB | 0.00% |
images/paid-memberships-pro-for-amp.png | 4.93KB | 3.64KB | ▼ 26.16% |
includes/options/redux-core/assets/img/menu_icon.png | 1.41KB | 0.50KB | ▼ 64.62% |
includes/options/redux-core/inc/fields/upload/blank.png | 0.90KB | 0.09KB | ▼ 89.72% |