10% adop-amp

Code Review | ADOP AMP

WordPress plugin ADOP AMP scored10%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: 6.3.1
  • 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 /782 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > 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: ▼1.94MB] [CPU: ▼52.77ms] Passed 4 tests

A check of server-side resources used by ADOP AMP
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.414.45 ▼34.70
Dashboard /wp-admin2.06 ▼1.245.91 ▼38.04
Posts /wp-admin/edit.php2.07 ▼1.295.61 ▼45.13
Add New Post /wp-admin/post-new.php2.06 ▼3.826.26 ▼93.20
Media Library /wp-admin/upload.php2.07 ▼1.166.65 ▼23.64

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
adop_amp_header_date
adop_amp_url
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ADOP AMP
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.24 ▼1.051.69 ▼0.1243.22 ▼3.66
Dashboard /wp-admin2,222 ▲344.80 ▼0.0796.45 ▼19.9039.43 ▼5.34
Posts /wp-admin/edit.php2,105 ▲162.11 ▲0.1140.76 ▼0.4535.30 ▲1.10
Add New Post /wp-admin/post-new.php1,555 ▲2218.48 ▼4.71607.80 ▲18.9755.73 ▲3.81
Media Library /wp-admin/upload.php1,404 ▲194.22 ▲0.0092.78 ▼5.0644.97 ▲1.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > 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)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 2× PHP files trigger server-side errors or warnings 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 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: page speed, adop, amp, loading speed, seo...

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

Analyzing the main PHP file in "ADOP AMP" version 1.0.0
15 characters long description:
ADOP AMP Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin94 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
Great job! No cyclomatic complexity issues were detected in this plugin
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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin