84% front-end-error-monitoring-with-bugsnag

Code Review | Front-end javascript error monitoring with Bugsnag

WordPress plugin Front-end javascript error monitoring with Bugsnag scored84%from 54 tests.

About plugin

  • Plugin page: front-end-error-m...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jan 13, 2022
  • Latest release: Apr 26, 2022
  • Number of updates: 5
  • Update frequency: every 21.0 days
  • Top authors: sanderdekroon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /316 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Front-end javascript error monitoring with Bugsnag
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2340.58 ▼0.57
Dashboard /wp-admin3.52 ▲0.2148.88 ▼9.87
Posts /wp-admin/edit.php3.57 ▲0.2154.48 ▲4.42
Add New Post /wp-admin/post-new.php6.04 ▲0.1595.17 ▼11.79
Media Library /wp-admin/upload.php3.38 ▲0.1541.40 ▲5.46
Front-end javascript error monitoring with Bugsnag /wp-admin/options-general.php?page=front-end-error-monitoring-with-bugsnag3.3743.76

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Front-end javascript error monitoring with Bugsnag
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.35 ▼0.272.22 ▲0.3742.40 ▲0.28
Dashboard /wp-admin2,204 ▲365.64 ▲0.1091.83 ▲0.7041.15 ▼0.65
Posts /wp-admin/edit.php2,106 ▲61.99 ▲0.0139.56 ▲3.7636.44 ▲1.69
Add New Post /wp-admin/post-new.php1,531 ▲523.22 ▲0.31626.92 ▼67.5148.48 ▼12.04
Media Library /wp-admin/upload.php1,406 ▲94.20 ▼0.01100.74 ▼4.9045.38 ▲3.15
Front-end javascript error monitoring with Bugsnag /wp-admin/options-general.php?page=front-end-error-monitoring-with-bugsnag8511.9921.4231.36

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/front-end-error-monitoring-with-bugsnag/config/container.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Sanderdekroon\\BugsnagJs\\ServiceProvider' not found in wp-content/plugins/front-end-error-monitoring-with-bugsnag/src/SettingsServiceProvider.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Sanderdekroon\\BugsnagJs\\ServiceProvider' not found in wp-content/plugins/front-end-error-monitoring-with-bugsnag/src/ScriptServiceProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/front-end-error-monitoring-with-bugsnag/assets/views/admin.configuration.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Sanderdekroon\\BugsnagJs\\Utility\\ParameterBag' not found in wp-content/plugins/front-end-error-monitoring-with-bugsnag/src/Utility/Request.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Sanderdekroon\\BugsnagJs\\Storage\\StorageInterface' not found in wp-content/plugins/front-end-error-monitoring-with-bugsnag/src/Storage/OptionStorage.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Sanderdekroon\\BugsnagJs\\ServiceProviderContract' not found in wp-content/plugins/front-end-error-monitoring-with-bugsnag/src/ServiceProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/front-end-error-monitoring-with-bugsnag/config/container.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: javascript, exception, error, monitoring, bugsnag...

front-end-error-monitoring-with-bugsnag/index.php 85% from 13 tests

"Front-end javascript error monitoring with Bugsnag" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("front-end-error-monitoring-with-bugsnag.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,212 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP262933801,160
JavaScript22446
JSON1005
CSS1211

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity8.47
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces2
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes00.00%
Methods106
▷ Static methods1917.92%
▷ Public methods9993.40%
▷ Protected methods54.72%
▷ Private methods21.89%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.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
There were not PNG files found in your plugin