78% error-tracker

Code Review | Error Tracker

WordPress plugin Error Tracker scored78%from 54 tests.

About plugin

  • Plugin page: error-tracker
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2019
  • Latest release: May 25, 2019
  • Number of updates: 5
  • Update frequency: every 22.2 days
  • Top authors: tsquare17 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.07ms] Passed 4 tests

This is a short check of server-side resources used by Error Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.01 ▼1.87
Dashboard /wp-admin3.34 ▲0.0450.52 ▼7.71
Posts /wp-admin/edit.php3.39 ▲0.0451.50 ▲2.47
Add New Post /wp-admin/post-new.php5.92 ▲0.04105.42 ▲4.30
Media Library /wp-admin/upload.php3.27 ▲0.0440.23 ▲2.85

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Error Tracker: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.47 ▲0.171.82 ▼0.5940.35 ▼6.24
Dashboard /wp-admin2,225 ▲375.85 ▼0.01106.20 ▲3.5739.67 ▲0.75
Posts /wp-admin/edit.php2,108 ▲192.00 ▼0.0039.13 ▲0.0935.17 ▲0.35
Add New Post /wp-admin/post-new.php1,532 ▼123.25 ▲0.26675.25 ▼10.9155.96 ▼4.82
Media Library /wp-admin/upload.php1,401 ▲104.17 ▼0.05107.64 ▼10.5947.86 ▼1.32

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/error-tracker/bootstrap.php
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/Processor/SanitizeStacktraceProcessor.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/Processor/SanitizeDataProcessor.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/Processor/RemoveCookiesProcessor.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/Breadcrumbs/MonologHandler.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/Processor/RemoveHttpBodyProcessor.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Serializer' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/ReprSerializer.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor_SanitizeDataProcessor' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/SanitizeDataProcessor.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Raven_Processor' not found in wp-content/plugins/error-tracker/vendor/sentry/lib/Raven/Processor/SanitizeHttpHeadersProcessor.php:18

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: tracking, sentry, errors, debugging, logrocket

error-tracker/bootstrap.php 85% from 13 tests

The main PHP file in "Error Tracker" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("error-tracker.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,833 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP284369132,369
Markdown21260283
YAML23084
JSON10059
XML12023
make16015

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity17.54
▷ Minimum class complexity1.00
▷ Maximum class complexity190.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes24
▷ Abstract classes14.17%
▷ Concrete classes2395.83%
▷ Final classes313.04%
Methods167
▷ Static methods2816.77%
▷ Public methods13480.24%
▷ Protected methods2414.37%
▷ Private methods95.39%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants18
▷ Global constants316.67%
▷ Class constants1583.33%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin