94% disabled-newrelic-for-amp

Code Review | Disabled NewRelic For AMP

WordPress plugin Disabled NewRelic For AMP scored 94% from 54 tests.

About plugin

  • Plugin page: disabled-newrelic...
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-5.2.3
  • WordPress version: 5.8.1
  • First release: Apr 20, 2016
  • Latest release: Sep 11, 2019
  • Number of updates: 6
  • Update frequency: every 206.5 days
  • Top authors: hideokamoto (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active / 1,380 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼142.78ms] Passed 4 tests

An overview of server-side resources used by Disabled NewRelic For AMP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.04 ▼0.74
Dashboard /wp-admin3.06 ▲0.0153.96 ▲9.55
Posts /wp-admin/edit.php3.12 ▲0.0149.06 ▼0.19
Add New Post /wp-admin/post-new.php5.42 ▼0.0185.22 ▼569.52
Media Library /wp-admin/upload.php3.01 ▲0.0030.67 ▼0.66

Server storage [IO: ▲0.04MB] [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 Disabled NewRelic For AMP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10616.33 ▲0.7611.57 ▲0.9846.50 ▼2.28
Dashboard /wp-admin2,970 ▲366.08 ▼0.02143.15 ▼8.07104.36 ▼8.22
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0264.96 ▼0.1382.50 ▼11.37
Add New Post /wp-admin/post-new.php2,061 ▲45719.48 ▲1.04400.44 ▲24.53113.33 ▲6.86
Media Library /wp-admin/upload.php1,807 ▼155.06 ▲0.03149.90 ▼9.11116.53 ▲0.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 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/disabled-newrelic-for-amp/disabled-newrelic-for-amp.php:15

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: newrelic, amp

disabled-newrelic-for-amp/disabled-newrelic-for-amp.php Passed 13 tests

The main PHP script in "Disabled NewRelic For AMP" version 3.0.0 is automatically included on every request by WordPress
56 characters long description:
This is simple plugin disable NewRelic for AMP endpoint.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected10 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP121310

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.75
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%
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
PNG images were not found in this plugin