10% adop-amp

Code Review | ADOP AMP

WordPress plugin ADOP AMP scored 10% from 54 tests.

About plugin

  • Plugin page: adop-amp
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.0
  • WordPress version: 5.9.2
  • First release: Apr 3, 2019
  • Latest release: Apr 4, 2019
  • Number of updates: 9
  • Update frequency: every 0.2 days
  • Top authors: adop (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 540 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/adop-amp/adop-amp.php+11
    Use of undefined constant ADOP_AMP_URL - assumed 'ADOP_AMP_URL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼2.51MB] [CPU: ▼335.83ms] Passed 4 tests

This is a short check of server-side resources used by ADOP AMP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.87 ▼1.653.93 ▼49.09
Dashboard /wp-admin1.88 ▼1.533.54 ▼29.46
Posts /wp-admin/edit.php1.88 ▼1.763.55 ▼32.34
Add New Post /wp-admin/post-new.php1.88 ▼5.094.76 ▼1,232.41
Media Library /wp-admin/upload.php1.88 ▼1.423.92 ▼21.24

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 2 new options
New WordPress options
adop_amp_url
adop_amp_header_date

Browser metrics Passed 4 tests

Checking browser requirements for ADOP AMP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲6116.01 ▲0.285.96 ▼0.762.55 ▲0.21
Dashboard /wp-admin2,908 ▲506.11 ▲0.05117.40 ▼20.87155.83 ▼9.99
Posts /wp-admin/edit.php2,711 ▲233.25 ▲0.0164.23 ▲1.93139.41 ▼4.69
Add New Post /wp-admin/post-new.php1,786 ▲12521.68 ▲5.82462.54 ▲62.14159.54 ▲2.39
Media Library /wp-admin/upload.php1,718 ▲205.49 ▼0.04151.92 ▲4.26187.12 ▼3.06

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/adop-amp/adop-amp.php+11
    Use of undefined constant ADOP_AMP_URL - assumed 'ADOP_AMP_URL' (this will throw an Error in a future version of PHP)

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ADOP_AMP_URL - assumed 'ADOP_AMP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/adop-amp/adop-amp.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/adop-amp/adop-amp.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: amp ads, adop, loading speed, seo, page speed...

adop-amp/adop-amp.php Passed 13 tests

The principal PHP file in "ADOP AMP" v. 1.0.0 is loaded by WordPress automatically on each request
15 characters long description:
ADOP AMP Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected94 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP4183594

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
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
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin