83% rollbar-logging

Code Review | Rollbar Logging

WordPress plugin Rollbar Logging scored83%from 54 tests.

About plugin

  • Plugin page: rollbar-logging
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.6.1
  • WordPress version: 6.3.1
  • First release: Mar 14, 2016
  • Latest release: Nov 4, 2016
  • Number of updates: 9
  • Update frequency: every 26.4 days
  • Top authors: ema-digital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,138 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.21MB] [CPU: ▼7.94ms] Passed 4 tests

An overview of server-side resources used by Rollbar Logging
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2136.45 ▼3.05
Dashboard /wp-admin3.56 ▲0.2245.69 ▼13.69
Posts /wp-admin/edit.php3.62 ▲0.2651.62 ▲1.54
Add New Post /wp-admin/post-new.php6.08 ▲0.2089.38 ▼13.53
Media Library /wp-admin/upload.php3.42 ▲0.2034.45 ▼1.47
Rollbar Logging /wp-admin/options-general.php?page=rollbar-logging-config3.3933.23

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Rollbar Logging
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲8313.31 ▼1.234.90 ▲2.9944.07 ▲0.55
Dashboard /wp-admin2,210 ▲224.85 ▼1.00111.85 ▼3.9342.70 ▼1.55
Posts /wp-admin/edit.php2,096 ▲101.99 ▼0.0239.83 ▲2.9435.07 ▲0.40
Add New Post /wp-admin/post-new.php1,540 ▼321.02 ▲2.90571.99 ▼32.4251.12 ▼5.58
Media Library /wp-admin/upload.php1,392 ▲14.17 ▼0.0398.20 ▲2.0542.33 ▼1.96
Rollbar Logging /wp-admin/options-general.php?page=rollbar-logging-config8672.0823.6230.84

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 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/rollbar-logging/lib/RollbarJSLogging.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid URI found ("")
  • Plugin Name: Please specify the plugin name on the first line ( === rollbar-logging === )
The official readme.txt might help

rollbar-logging/plugin.php 92% from 13 tests

The entry point to "Rollbar Logging" version 1.1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rollbar-logging.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,214 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP72531971,153
CSS110046
JavaScript25215

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity19.91
▷ Minimum class complexity1.00
▷ Maximum class complexity163.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces2
Traits0
Classes9
▷ Abstract classes111.11%
▷ Concrete classes888.89%
▷ Final classes00.00%
Methods84
▷ Static methods67.14%
▷ Public methods4351.19%
▷ Protected methods4148.81%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants6100.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