94% go-newrelic

Code Review | Gigaom New Relic

WordPress plugin Gigaom New Relic scored 94% from 54 tests.

About plugin

  • Plugin page: go-newrelic
  • Plugin version: 0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0
  • WordPress version: 5.8.1
  • First release: May 24, 2013
  • Latest release: Nov 4, 2014
  • Number of updates: 9
  • Update frequency: every 61.0 days
  • Top authors: misterbisson (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 10,689 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼145.71ms] Passed 4 tests

An overview of server-side resources used by Gigaom New Relic
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0432.82 ▲3.08
Dashboard /wp-admin3.10 ▲0.0445.14 ▲1.22
Posts /wp-admin/edit.php3.15 ▲0.0442.59 ▲0.31
Add New Post /wp-admin/post-new.php5.46 ▲0.0385.53 ▼573.27
Media Library /wp-admin/upload.php3.04 ▲0.0330.59 ▼11.10
New Relic Settings /wp-admin/options-general.php?page=go-newrelic-settings3.0129.09

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Gigaom New Relic
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.93 ▲0.498.22 ▲0.5445.64 ▼2.48
Dashboard /wp-admin2,972 ▲385.89 ▼0.13139.81 ▼0.1599.59 ▼2.16
Posts /wp-admin/edit.php2,744 ▲52.68 ▼0.0165.60 ▲0.5689.37 ▼3.80
Add New Post /wp-admin/post-new.php1,501 ▼17118.81 ▲0.01360.92 ▼7.43111.16 ▼0.75
Media Library /wp-admin/upload.php1,815 ▲85.01 ▼0.02156.99 ▲8.96114.25 ▼13.31
New Relic Settings /wp-admin/options-general.php?page=go-newrelic-settings1,0352.0957.7669.25

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
Uninstall script ran successfully

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
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/go-newrelic/components/class-go-newrelic-browser.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: Please add images for these screenshots: #1 (New Relic application list, showing two blogs. Each WordPress blog is reported as four applications in New Relic to separate reader, writer, cron, and admin-ajax activity for better detail and fine-grained control.), #2 (New Relic application overview, showing performance history for a single app.)
Please take inspiration from this readme.txt

go-newrelic/go-newrelic.php 92% from 13 tests

"Gigaom New Relic" version 0.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 164 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin252 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP44662252

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.43
Average class complexity11.33
▷ Minimum class complexity9.00
▷ Maximum class complexity14.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png63.11KB35.99KB▼ 42.97%
screenshot-2.png112.27KB56.19KB▼ 49.95%