84% ampify-io-amp

Code Review | Ampify

WordPress plugin Ampify scored84%from 54 tests.

About plugin

  • Plugin page: ampify-io-amp
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.3.2
  • WordPress version: 6.3.1
  • First release: Apr 3, 2020
  • Latest release: Apr 14, 2020
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: ampify (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /527 total downloads

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.03MB] [CPU: ▼2.81ms] Passed 4 tests

Server-side resources used by Ampify
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.21 ▲5.66
Dashboard /wp-admin3.34 ▲0.0345.38 ▼1.96
Posts /wp-admin/edit.php3.39 ▲0.0344.19 ▼0.96
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.62 ▼12.27
Media Library /wp-admin/upload.php3.26 ▲0.0337.06 ▲3.96
Ampify /wp-admin/tools.php?page=ampify-io-amp3.2231.53

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ampify
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8314.44 ▲0.142.02 ▲0.4042.54 ▲0.18
Dashboard /wp-admin2,207 ▲194.85 ▼1.0097.47 ▼4.0239.37 ▼0.52
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0539.79 ▲1.5534.78 ▼2.08
Add New Post /wp-admin/post-new.php1,545 ▲1223.03 ▼0.12637.57 ▼17.7456.12 ▲3.73
Media Library /wp-admin/upload.php1,392 ▲14.20 ▼0.0094.90 ▼0.1342.02 ▲0.63
Ampify /wp-admin/tools.php?page=ampify-io-amp8662.0322.6834.69

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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 | 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
  • 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/ampify-io-amp/ampify.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: devtool, tool, amp

ampify-io-amp/ampify.php 92% from 13 tests

"Ampify" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ampify-io-amp.php" instead of "ampify.php")

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
There were no executable files found in this plugin202 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1529202

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods1292.31%
▷ Protected methods00.00%
▷ Private methods17.69%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin