78% rollbar

Code Review | Rollbar

WordPress plugin Rollbar scored78%from 54 tests.

About plugin

  • Plugin page: rollbar
  • Plugin version: 2.7.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 4, 2015
  • Latest release: Sep 14, 2023
  • Number of updates: 97
  • Update frequency: every 29.6 days
  • Top authors: arturmoczulski (85.57%)flowdee (11.34%)jorbin (3.09%)danielmorell (3.09%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /66,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.64MB] [CPU: ▼0.18ms] Passed 4 tests

Analyzing server-side resources used by Rollbar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4750.63 ▲11.24
Dashboard /wp-admin4.04 ▲0.7453.21 ▲0.94
Posts /wp-admin/edit.php4.10 ▲0.7447.50 ▲3.53
Add New Post /wp-admin/post-new.php6.57 ▲0.6885.97 ▼13.44
Media Library /wp-admin/upload.php3.90 ▲0.6841.62 ▲8.25
Rollbar /wp-admin/options-general.php?page=rollbar_wp3.8835.69

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 1,207 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Rollbar
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.21 ▼1.171.89 ▲0.1342.72 ▼0.72
Dashboard /wp-admin2,207 ▲225.79 ▼0.06102.79 ▼12.1440.17 ▼7.18
Posts /wp-admin/edit.php2,093 ▲72.13 ▲0.1232.71 ▼3.8031.66 ▼2.21
Add New Post /wp-admin/post-new.php1,546 ▲1118.48 ▼4.55588.44 ▼59.4747.09 ▼8.07
Media Library /wp-admin/upload.php1,392 ▲14.25 ▲0.0194.70 ▼2.6541.51 ▼3.52
Rollbar /wp-admin/options-general.php?page=rollbar_wp1,5681.7124.7141.91

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/rollbar/php7/vendor/michelf/php-markdown/Readme.php
    • > /wp-content/plugins/rollbar/php8/vendor/michelf/php-markdown/Readme.php
  • 370× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Handler\\FingersCrossed\\ActivationStrategyInterface' not found in wp-content/plugins/rollbar/php8/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php:25
    • > PHP Parse error
      syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE) in wp-content/plugins/rollbar/php8/vendor/rollbar/rollbar/src/Payload/Message.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/rollbar/php7/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Rollbar\\BaseRollbarTest' not found in wp-content/plugins/rollbar/php8/vendor/rollbar/rollbar/tests/ConfigTest.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/rollbar/php8/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'Rollbar\\Handlers\\AbstractHandler' not found in wp-content/plugins/rollbar/php7/vendor/rollbar/rollbar/src/Handlers/ErrorHandler.php:7
    • > PHP Parse error
      syntax error, unexpected '|', expecting variable (T_VARIABLE) in wp-content/plugins/rollbar/php8/vendor/rollbar/rollbar/tests/LevelFactoryTest.php on line 61
    • > PHP Fatal error
      Uncaught Error: Interface 'Rollbar\\SerializerInterface' not found in wp-content/plugins/rollbar/php8/vendor/rollbar/rollbar/src/Payload/Server.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Rollbar\\BaseRollbarTest' not found in wp-content/plugins/rollbar/php8/vendor/rollbar/rollbar/tests/Truncation/RawStrategyTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/rollbar/php8/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: full stack, error, reporting, error tracking, tracking...

rollbar/rollbar-php-wordpress.php 92% from 13 tests

"Rollbar" version 2.7.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time 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.php" instead of "rollbar-php-wordpress.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
No dangerous file extensions were detected56,122 lines of code in 982 files:
LanguageFilesBlank linesComment linesLines of code
PHP4919,43417,42542,873
JSON152603,436
Markdown211,10403,343
JavaScript37241243,110
XHTML561,02402,503
YAML1156104424
PO File25151160
XML752158
HTML4451368
CSS17032
Bourne Shell1778
Dockerfile1307

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity9.05
▷ Minimum class complexity1.00
▷ Maximum class complexity175.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces30
Interfaces38
Traits10
Classes433
▷ Abstract classes204.62%
▷ Concrete classes41395.38%
▷ Final classes51.21%
Methods3,671
▷ Static methods2657.22%
▷ Public methods2,74374.72%
▷ Protected methods66818.20%
▷ Private methods2607.08%
Functions147
▷ Named functions64.08%
▷ Anonymous functions14195.92%
Constants174
▷ Global constants63.45%
▷ Class constants16896.55%
▷ Public constants14183.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected