84% rt-newrelic-browser

Code Review | New Relic Browser by rtCamp

WordPress plugin New Relic Browser by rtCamp scored84%from 54 tests.

About plugin

  • Plugin page: rt-newrelic-browser
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8
  • WordPress version: 6.3.1
  • First release: Jan 15, 2015
  • Latest release: Dec 25, 2016
  • Number of updates: 46
  • Update frequency: every 19.3 days
  • Top authors: rtcamp (91.3%)bhargavbhandari90 (6.52%)kiranpotphode (6.52%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /9,632 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
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼9.45ms] Passed 4 tests

A check of server-side resources used by New Relic Browser by rtCamp
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.32 ▼1.25
Dashboard /wp-admin3.37 ▲0.0249.04 ▼17.75
Posts /wp-admin/edit.php3.42 ▲0.0647.31 ▲0.11
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.04 ▼18.91
Media Library /wp-admin/upload.php3.29 ▲0.0639.40 ▲5.11
New Relic Browser /wp-admin/options-general.php?page=new-relic-browser3.2834.10

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

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

Browser metrics Passed 4 tests

Checking browser requirements for New Relic Browser by rtCamp
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.80 ▲0.491.82 ▼0.0343.57 ▲2.22
Dashboard /wp-admin2,220 ▲405.92 ▲0.28102.07 ▲12.1943.05 ▼1.44
Posts /wp-admin/edit.php2,127 ▲272.35 ▲0.3536.42 ▼0.5232.56 ▼2.23
Add New Post /wp-admin/post-new.php1,547 ▲2123.53 ▼0.21679.75 ▼20.4437.06 ▼24.31
Media Library /wp-admin/upload.php1,425 ▲254.45 ▲0.23101.87 ▼10.5543.45 ▼4.16
New Relic Browser /wp-admin/options-general.php?page=new-relic-browser1,0022.0827.7128.12

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      require_once(/tmp/wordpress-tests-lib/includes/functions.php): failed to open stream: No such file or directory in wp-content/plugins/rt-newrelic-browser/tests/bootstrap.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rt-newrelic-browser/admin/new-relic-admin.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rt-newrelic-browser/NewRelicBrowser.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/rt-newrelic-browser/tests/test-relicform.php:3
    • > PHP Fatal error
      require_once(): Failed opening required '/tmp/wordpress-tests-lib/includes/functions.php' (include_path='.:/usr/share/php') in wp-content/plugins/rt-newrelic-browser/tests/bootstrap.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: javascript monitoring, new relic wordpress mu, new relic browser for wordpress, new relic wordpress multisite, new relic wordpress...

rt-newrelic-browser/NewRelicBrowser.php 92% from 13 tests

The main PHP file in "New Relic Browser by rtCamp" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rt-newrelic-browser.php" instead of "NewRelicBrowser.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
There were no executable files found in this plugin1,845 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP799113787
CSS22438662
Bourne Again Shell23515172
JavaScript118593
Bourne Shell115459
Markdown131058
XML10014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity20.67
▷ Minimum class complexity1.00
▷ Maximum class complexity38.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants3
▷ Global constants3100.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
6 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png26.51KB8.99KB▼ 66.08%
assets/screenshot-3.png27.86KB10.55KB▼ 62.15%
assets/icon-128x128.png7.52KB2.80KB▼ 62.76%
assets/screenshot-4.png29.10KB11.08KB▼ 61.93%
assets/screenshot-1.png22.86KB7.88KB▼ 65.56%