84% javascript-error-reporting-client

Code Review | Javascript Error Reporting Client

WordPress plugin Javascript Error Reporting Client scored84%from 54 tests.

About plugin

  • Plugin page: javascript-error-...
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Nov 15, 2021
  • Latest release: Nov 15, 2021
  • Number of updates: 2
  • Update frequency: every 3.5 days
  • Top authors: jdamner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /308 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.72ms] Passed 4 tests

Server-side resources used by Javascript Error Reporting Client
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.79 ▼6.12
Dashboard /wp-admin3.32 ▲0.0248.75 ▼5.97
Posts /wp-admin/edit.php3.37 ▲0.0149.25 ▼7.62
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.93 ▼23.18
Media Library /wp-admin/upload.php3.24 ▲0.0136.32 ▲1.39
Javascript Errors /wp-admin/tools.php?page=javascript_error_reporting_client3.2736.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 19 new files
Database: 1 new table, 7 new options
New tables
wp_javascript_error_reporting_client_data
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
javascript_error_reporting_client_db_version
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Javascript Error Reporting Client
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6214.37 ▲0.002.04 ▲0.4739.52 ▲0.54
Dashboard /wp-admin2,190 ▲135.66 ▼0.03106.22 ▲5.7454.58 ▲10.30
Posts /wp-admin/edit.php2,101 ▲12.01 ▼0.0840.80 ▼2.7736.37 ▲2.01
Add New Post /wp-admin/post-new.php1,529 ▼417.60 ▼5.75628.24 ▲29.2950.40 ▲0.37
Media Library /wp-admin/upload.php1,407 ▲44.22 ▼0.00100.25 ▼1.8842.73 ▼6.24
Javascript Errors /wp-admin/tools.php?page=javascript_error_reporting_client1,0082.0526.1524.42

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/javascript-error-reporting-client/admin/partials/jerc-admin-display.php:20

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: js, console, bug, debug, developer...

javascript-error-reporting-client/jerc.php 92% from 13 tests

The principal PHP file in "Javascript Error Reporting Client" v. 1.0.3 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("javascript-error-reporting-client.php" instead of "jerc.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
Good job! No executable or dangerous file extensions detected666 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP9114555618
JavaScript21025
JSON10017
Markdown1306
CSS1040

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity7.83
▷ Minimum class complexity2.00
▷ Maximum class complexity29.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2062.50%
▷ Protected methods00.00%
▷ Private methods1237.50%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin