84% bugsnag

Code Review | WordPress Error Monitoring by Bugsnag

WordPress plugin WordPress Error Monitoring by Bugsnag scored84%from 54 tests.

About plugin

  • Plugin page: bugsnag
  • Plugin version: 1.6.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 19, 2013
  • Latest release: Jul 13, 2023
  • Number of updates: 40
  • Update frequency: every 87.3 days
  • Top authors: loopj (47.5%)imjoehaines (22.5%)bengourley (17.5%)conradirwin (15%)tomlongridge (7.5%)

Code review

54 tests

User reviews

9 reviews

Install metrics

3,000+ active /73,494 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▼3.02ms] Passed 4 tests

A check of server-side resources used by WordPress Error Monitoring by Bugsnag
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3142.06 ▲3.98
Dashboard /wp-admin3.60 ▲0.2547.75 ▼11.76
Posts /wp-admin/edit.php3.65 ▲0.2948.62 ▲1.25
Add New Post /wp-admin/post-new.php6.11 ▲0.2291.71 ▼4.24
Media Library /wp-admin/upload.php3.46 ▲0.2236.66 ▲2.67
Bugsnag /wp-admin/options-general.php?page=bugsnag3.4332.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WordPress Error Monitoring by Bugsnag
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.14 ▼0.151.65 ▼0.0243.63 ▲3.60
Dashboard /wp-admin2,202 ▲255.63 ▲0.0689.85 ▲4.3042.30 ▼3.67
Posts /wp-admin/edit.php2,104 ▲12.00 ▲0.0140.29 ▲4.5834.03 ▼0.23
Add New Post /wp-admin/post-new.php1,531 ▲323.20 ▼0.01586.37 ▼81.7960.67 ▲5.00
Media Library /wp-admin/upload.php1,398 ▼54.11 ▼0.0998.80 ▲2.6840.66 ▼2.38
Bugsnag /wp-admin/options-general.php?page=bugsnag8212.0123.8028.13

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/bugsnag/views/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/bugsnag/bugsnag.php:353

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: bugsnag, monitoring, error, logging, exception

bugsnag/bugsnag.php 92% from 13 tests

The principal PHP file in "WordPress Error Monitoring by Bugsnag" v. 1.6.3 is loaded by WordPress automatically on each request
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,379 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP113429291,379

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity20.67
▷ Minimum class complexity5.00
▷ Maximum class complexity37.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods116
▷ Static methods1815.52%
▷ Public methods9783.62%
▷ Protected methods00.00%
▷ Private methods1916.38%
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
PNG images were not found in this plugin