Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.01MB] [CPU: ▼2.09ms] Passed 4 tests
This is a short check of server-side resources used by Simple AMP
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 38.66 ▲0.21 |
Dashboard /wp-admin | 3.32 ▲0.01 | 48.19 ▲0.44 |
Posts /wp-admin/edit.php | 3.37 ▲0.02 | 49.67 ▲0.90 |
Add New Post /wp-admin/post-new.php | 5.90 ▲0.01 | 87.13 ▼9.91 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 38.41 ▲1.82 |
Server storage [IO: ▲3.61MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 612 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
Simple AMP: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,801 ▲55 | 14.48 ▼0.27 | 1.71 ▼0.16 | 44.79 ▲4.90 |
Dashboard /wp-admin | 2,206 ▲15 | 4.88 ▼0.24 | 109.39 ▲3.32 | 41.42 ▼0.79 |
Posts /wp-admin/edit.php | 2,089 ▼3 | 2.03 ▲0.04 | 40.17 ▼1.31 | 34.99 ▼1.18 |
Add New Post /wp-admin/post-new.php | 1,536 ▲2 | 22.99 ▼0.15 | 632.14 ▼63.81 | 49.46 ▼9.37 |
Media Library /wp-admin/upload.php | 1,388 ▲3 | 4.15 ▼0.14 | 97.43 ▼5.17 | 48.93 ▲2.35 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
- 6× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/simple-amp/vendor/masterminds/html5/bin/entities.php
- > /wp-content/plugins/simple-amp/vendor/querypath/querypath/phar/basic_loader.php
- > /wp-content/plugins/simple-amp/vendor/querypath/querypath/examples/at_a_glance.php
- > /wp-content/plugins/simple-amp/vendor/sabberworm/php-css-parser/tests/quickdump.php
- > /wp-content/plugins/simple-amp/vendor/querypath/querypath/bin/compactor.php
- > /wp-content/plugins/simple-amp/vendor/querypath/querypath/examples/html.php
- 249× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/simple-amp/vendor/guzzlehttp/psr7/tests/StreamWrapperTest.php:10
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/simple-amp/vendor/guzzlehttp/psr7/src/DroppingStream.php:10
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/simple-amp/vendor/sabberworm/php-css-parser/tests/Sabberworm/CSS/CSSList/DocumentTest.php:7
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/simple-amp/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
- > PHP Fatal error
Uncaught Error: Class 'Masterminds\\HTML5' not found in wp-content/plugins/simple-amp/vendor/lullabot/amp/src/Utility/AMPHTML5.php:36
- > PHP Fatal error
require_once(): Failed opening required '../src/QueryPath/QueryPath.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-amp/vendor/querypath/querypath/examples/dbpedia.php on line 28
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/simple-amp/vendor/guzzlehttp/psr7/src/NoSeekStream.php:9
- > PHP Fatal error
Uncaught Error: Interface 'Sabberworm\\CSS\\Property\\AtRule' not found in wp-content/plugins/simple-amp/vendor/sabberworm/php-css-parser/lib/Sabberworm/CSS/Property/CSSNamespace.php:8
- > PHP Warning
require(wp-content/plugins/simple-amp/vendor/guzzlehttp/psr7/tests/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/simple-amp/vendor/guzzlehttp/psr7/tests/bootstrap.php on line 4
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/simple-amp/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php:10
- > 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)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: google, mobile, amp, accelerated mobile pages
simple-amp/simple-amp.php Passed 13 tests
The main PHP file in "Simple AMP" ver. 0.1.1 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
A simple plugin that generates AMP pages based on current template.
Code Analysis 3% from 3 tests
File types 0% from 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Almost there! Just fix the following issues
- Do not include executable or dangerous files in your plugin
- .out - Executable in Linux
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/amp_layouts.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/aria.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/audio-to-amp-audio-conversion-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/bad_viewport.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/blacklisted_tags.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/dailymotion-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/diff_test.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/duplicate_unique_tags_and_wrong_parents.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/empty.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/facebook-iframe-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/facebook-non-iframe-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/iframe-http-to-https-conversion.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/img-test-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/incorrect_custom_style.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/incorrect_mandatory_style.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/instagram-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/javascript_xss.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/link_meta_values.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/mandatory_dimensions.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/minimum_valid_amp.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/new_and_old_boilerplate_mixed.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/new_and_old_boilerplate_mixed2.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/no_custom_js.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/no_important.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/noscript.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/old-boilerplate.amp.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/pinterest-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/regexps.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/sample-html-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/several_errors.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/show_lines_no_orig_and_warn.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/soundcloud-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/spec_example.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/svg.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/template_test.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/template_test_with_statistics.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/track_tag.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/twitter-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/urls.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-accordion.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-carousel.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-facebook.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-jwplayer.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-mustache.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-pinterest.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-sidebar.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-soundcloud.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-springboard-player.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-vimeo.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/validator-amp-youtube.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/video-fragment-and-placeholder-test.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/full-html/video-to-amp-video-conversion.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/vimeo-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/vine-fragment.html.out
- ☣ wp-content/plugins/simple-amp/vendor/lullabot/amp/tests/test-data/fragment-html/youtube-fragment.html.out
- .out - Executable in Linux
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 346 | 7,065 | 17,177 | 46,853 |
XML | 25 | 40 | 6 | 10,395 |
Markdown | 24 | 1,311 | 0 | 4,500 |
HTML | 59 | 218 | 787 | 1,437 |
JSON | 18 | 0 | 0 | 888 |
Ant | 2 | 89 | 133 | 394 |
CSS | 30 | 43 | 16 | 264 |
YAML | 8 | 31 | 4 | 162 |
make | 3 | 20 | 1 | 51 |
Bourne Shell | 5 | 10 | 8 | 44 |
INI | 2 | 0 | 0 | 5 |
SVG | 1 | 0 | 0 | 4 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
- Please reduce cyclomatic complexity of methods to less than 100 (currently 116)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.21 |
Average class complexity | 13.04 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 381.00 |
Average method complexity | 2.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 116.00 |
Code structure | ||
---|---|---|
Namespaces | 42 | |
Interfaces | 26 | |
Traits | 2 | |
Classes | 315 | |
▷ Abstract classes | 8 | 2.54% |
▷ Concrete classes | 307 | 97.46% |
▷ Final classes | 7 | 2.28% |
Methods | 2,848 | |
▷ Static methods | 129 | 4.53% |
▷ Public methods | 2,466 | 86.59% |
▷ Protected methods | 207 | 7.27% |
▷ Private methods | 175 | 6.14% |
Functions | 381 | |
▷ Named functions | 66 | 17.32% |
▷ Anonymous functions | 315 | 82.68% |
Constants | 395 | |
▷ Global constants | 11 | 2.78% |
▷ Class constants | 384 | 97.22% |
▷ Public constants | 384 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin