90% wp-newrelic

Code Review | New Relic Reporting for WordPress

WordPress plugin New Relic Reporting for WordPress scored90%from 54 tests.

About plugin

  • Plugin page: wp-newrelic
  • Plugin version: 1.3.2
  • PHP compatiblity: 7.3.11+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 2, 2016
  • Latest release: Sep 20, 2023
  • Number of updates: 14
  • Update frequency: every 176.9 days
  • Top authors: vhauri (35.71%)collinsinternet (28.57%)10up (21.43%)10upbot (21.43%)tott (14.29%)

Code review

54 tests

User reviews

2 reviews

Install metrics

800+ active /63,514 total downloads

Benchmarks

Plugin footprint 83% from 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.01MB] [CPU: ▼8.45ms] Passed 4 tests

An overview of server-side resources used by New Relic Reporting for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.02 ▲0.70
Dashboard /wp-admin3.31 ▲0.0149.95 ▼6.51
Posts /wp-admin/edit.php3.37 ▲0.0150.22 ▼10.78
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.52 ▼14.98
Media Library /wp-admin/upload.php3.24 ▲0.0137.45 ▼1.53

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for New Relic Reporting for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.14 ▼0.441.61 ▼0.9646.50 ▲1.39
Dashboard /wp-admin2,204 ▲335.56 ▼0.0191.84 ▲1.9644.24 ▼1.97
Posts /wp-admin/edit.php2,110 ▲102.04 ▲0.0341.09 ▲2.4738.27 ▲0.54
Add New Post /wp-admin/post-new.php1,542 ▲1623.29 ▼0.42640.35 ▼53.0845.23 ▼14.10
Media Library /wp-admin/upload.php1,403 ▲94.24 ▼0.0197.49 ▼19.7439.40 ▼14.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 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)
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 uses markdown syntax to describe your plugin to the world
4 plugin tags: new relic reporting, new relic apm reporting, new relic, apm reporting

wp-newrelic/newrelic-reporting-for-wordpress.php 92% from 13 tests

"New Relic Reporting for WordPress" version 1.3.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-newrelic.php" instead of "newrelic-reporting-for-wordpress.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected378 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP584177378

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity21.50
▷ Minimum class complexity2.00
▷ Maximum class complexity72.00
Average method complexity4.42
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods24
▷ Static methods312.50%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin