Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.10MB] [CPU: ▼295.76ms] Passed 4 tests
A check of server-side resources used by AMP Supremacy
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.59 ▲0.08 | 58.80 ▲10.47 |
Dashboard /wp-admin | 3.51 ▲0.10 | 39.43 ▲3.83 |
Posts /wp-admin/edit.php | 3.79 ▲0.15 | 46.25 ▲7.52 |
Add New Post /wp-admin/post-new.php | 7.04 ▲0.07 | 97.66 ▼1,198.58 |
Media Library /wp-admin/upload.php | 3.46 ▲0.16 | 28.01 ▲4.21 |
Server storage [IO: ▲3.68MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 190 new files
Database: no new tables, 1 new option
New WordPress options |
---|
amp_supremacy_stat_id |
Browser metrics Passed 4 tests
An overview of browser requirements for AMP Supremacy
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,834 ▲80 | 15.90 ▲0.28 | 6.04 ▲0.17 | 1.98 ▼0.29 |
Dashboard /wp-admin | 2,942 ▲84 | 6.20 ▲0.02 | 120.32 ▼19.31 | 183.24 ▲19.59 |
Posts /wp-admin/edit.php | 2,727 ▲36 | 3.27 ▲0.05 | 68.38 ▲1.14 | 141.46 ▼9.00 |
Add New Post /wp-admin/post-new.php | 1,809 ▲148 | 17.38 ▲1.33 | 407.97 ▼36.79 | 176.62 ▲14.51 |
Media Library /wp-admin/upload.php | 1,749 ▲51 | 5.58 ▲0.06 | 125.70 ▼17.93 | 201.37 ▲19.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- Zombie WordPress options were found after uninstall: 1 option
- amp_supremacy_stat_id
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
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
Almost there! Just fix the following items
- 4× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/amp-supremacy/pages/sections/menu.php
- > /wp-content/plugins/amp-supremacy/pages/sections/mobile_test.php
- > /wp-content/plugins/amp-supremacy/pages/sections/design.php
- > /wp-content/plugins/amp-supremacy/pages/sections/structured_data.php
- 27× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Notice
Undefined variable: AMPLiteLicenseRequested in wp-content/plugins/amp-supremacy/pages/sections/amp_lite.php on line 39
- > PHP Notice
Undefined variable: amps in wp-content/plugins/amp-supremacy/pages/sections/design.php on line 43
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/amp-supremacy/pages/sections/design.php on line 31
- > PHP Notice
Undefined variable: registration_status in wp-content/plugins/amp-supremacy/pages/sections/amp_lite.php on line 67
- > PHP Warning
require_once(AMP_PATH/pages/sections/amp-db-settings.php): failed to open stream: No such file or directory in wp-content/plugins/amp-supremacy/pages/amp_settings.php on line 1
- > PHP Fatal error
Uncaught Error: Call to undefined function site_url() in wp-content/plugins/amp-supremacy/pages/sections/settings.php:13
- > PHP Notice
Undefined variable: amps in wp-content/plugins/amp-supremacy/pages/sections/design.php on line 24
- > PHP Notice
Undefined variable: AMPLiteLicenseRequested in wp-content/plugins/amp-supremacy/pages/sections/amp_lite.php on line 16
- > PHP Notice
Trying to access array offset on value of type null in wp-content/plugins/amp-supremacy/pages/sections/design.php on line 43
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/amp-supremacy/pages/amps-sample.php:2
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
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: design your accelerated mobile pages, accelerated mobile pages, amp validator, amp
amp-supremacy/amp-supremacy.php Passed 13 tests
The main PHP script in "AMP Supremacy" version 2.0.13 is automatically included on every request by WordPress
78 characters long description:
AMP Supremacy | Accelerated Mobile Pages - By the makers of Project Supremacy.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin9,464 lines of code in 117 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 22 | 801 | 372 | 4,644 |
JavaScript | 48 | 604 | 368 | 2,950 |
CSS | 46 | 183 | 241 | 1,215 |
SVG | 1 | 0 | 0 | 655 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.49 |
Average class complexity | 92.29 |
▷ Minimum class complexity | 24.00 |
▷ Maximum class complexity | 197.00 |
Average method complexity | 4.97 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 99.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 160 | |
▷ Static methods | 74 | 46.25% |
▷ Public methods | 143 | 89.38% |
▷ Protected methods | 16 | 10.00% |
▷ Private methods | 1 | 0.62% |
Functions | 9 | |
▷ Named functions | 5 | 55.56% |
▷ Anonymous functions | 4 | 44.44% |
Constants | 46 | |
▷ Global constants | 41 | 89.13% |
▷ Class constants | 5 | 10.87% |
▷ Public constants | 5 | 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
35 compressed PNG files occupy 0.66MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/close-menu.png | 0.56KB | 0.58KB | 0.00% |
assets/img/touch/touch-icon-60x60.png | 2.78KB | 1.95KB | ▼ 29.72% |
assets/img/menu-icon.png | 1.41KB | 1.57KB | 0.00% |
assets/img/logo.png | 4.60KB | 3.49KB | ▼ 24.21% |
assets/img/startup/startup-retina.png | 2.21KB | 2.37KB | 0.00% |