10% amp-with-postlight-mercury

Code Review | AMP With Postlight Mercury

WordPress plugin AMP With Postlight Mercury scored 10% from 54 tests.

About plugin

  • Plugin page: amp-with-postligh...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: May 24, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 4
  • Update frequency: every 17.5 days
  • Top authors: morgvanny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 755 total downloads


Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/amp-with-postlight-mercury/amp-with-postlight-mercury.php+61
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.86MB] [CPU: ▼694.13ms] Passed 4 tests

An overview of server-side resources used by AMP With Postlight Mercury
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.77 ▼1.077.43 ▼27.45
Dashboard /wp-admin1.79 ▼1.278.00 ▼43.09
Posts /wp-admin/edit.php1.79 ▼1.335.21 ▼50.29
Add New Post /wp-admin/post-new.php1.79 ▼3.655.46 ▼2,655.34
Media Library /wp-admin/upload.php1.79 ▼1.215.53 ▼27.78

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AMP With Postlight Mercury
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,699 ▲6216.31 ▲0.398.65 ▲0.0851.88 ▼0.25
Dashboard /wp-admin3,012 ▲816.05 ▲0.09141.07 ▼15.96115.22 ▼3.32
Posts /wp-admin/edit.php2,759 ▲202.70 ▲0.0166.64 ▼0.1098.93 ▲5.87
Add New Post /wp-admin/post-new.php1,685 ▲18518.98 ▲0.31377.96 ▼6.27113.23 ▲1.08
Media Library /wp-admin/upload.php1,830 ▲174.99 ▼0.04144.70 ▼5.11128.76 ▲0.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/amp-with-postlight-mercury/amp-with-postlight-mercury.php+61
    Trying to access array offset on value of type bool

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/amp-with-postlight-mercury/amp-with-postlight-mercury.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


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
5 plugin tags: free, mobile, seo, speed, amp

amp-with-postlight-mercury/amp-with-postlight-mercury.php Passed 13 tests

This is the main PHP file of "AMP With Postlight Mercury" version 1.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
126 characters long description:
This plugin adds some code to your page headers, letting Postlight provide an AMP solution for you, using their tool, Mercury.

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 plugin53 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected