94% wp-javascript-error-logger

Code Review | WP JavaScript Error Logger

WordPress plugin WP JavaScript Error Logger scored 94% from 54 tests.

About plugin

  • Plugin page: wp-javascript-err...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.1
  • WordPress version: 5.8.1
  • First release: Apr 27, 2013
  • Latest release: May 3, 2013
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: eskapism (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,401 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼137.00ms] Passed 4 tests

An overview of server-side resources used by WP JavaScript Error Logger
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1433.80 ▲14.11
Dashboard /wp-admin3.10 ▲0.0443.95 ▲2.27
Posts /wp-admin/edit.php3.15 ▲0.0443.76 ▲0.47
Add New Post /wp-admin/post-new.php5.46 ▲0.0392.26 ▼551.02
Media Library /wp-admin/upload.php3.04 ▲0.0432.85 ▲0.29
JS Error Log /wp-admin/edit.php?post_type=js_error_log3.0832.89
Add New /wp-admin/post-new.php?post_type=js_error_log3.0841.00

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP JavaScript Error Logger
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,721 ▲12515.81 ▲0.158.40 ▼2.3749.96 ▲3.73
Dashboard /wp-admin3,002 ▲685.90 ▼0.05138.16 ▼3.00111.98 ▲8.07
Posts /wp-admin/edit.php2,774 ▲352.73 ▲0.0263.51 ▼2.2796.68 ▼4.84
Add New Post /wp-admin/post-new.php1,695 ▲19518.77 ▲0.23353.96 ▼14.39105.39 ▼5.66
Media Library /wp-admin/upload.php1,842 ▲325.02 ▼0.03143.78 ▲3.88119.89 ▲1.19
JS Error Log /wp-admin/edit.php?post_type=js_error_log1,4672.6465.6373.46
Add New /wp-admin/post-new.php?post_type=js_error_log2,0973.3382.81118.41

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

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
Everything seems fine, however 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-javascript-error-logger/index.php:21

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: browser, log, error, javascript

wp-javascript-error-logger/index.php 92% from 13 tests

Analyzing the main PHP file in "WP JavaScript Error Logger" version 1.0
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-javascript-error-logger.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin76 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1363776

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected