74% inspectlet-heatmaps-and-user-session-recording

Code Review | Inspectlet - User Session Recording and Heatmaps

WordPress plugin Inspectlet - User Session Recording and Heatmaps scored74%from 54 tests.

About plugin

  • Plugin page: inspectlet-heatma...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-4.7
  • WordPress version: 6.3.1
  • First release: Mar 27, 2014
  • Latest release: Mar 11, 2017
  • Number of updates: 4
  • Update frequency: every 344.3 days
  • Top authors: inspectlet (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /16,490 total downloads

Benchmarks

Plugin footprint 65% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.94MB] [CPU: ▼52.61ms] Passed 4 tests

A check of server-side resources used by Inspectlet - User Session Recording and Heatmaps
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.25 ▼32.61
Dashboard /wp-admin2.07 ▼1.236.08 ▼37.95
Posts /wp-admin/edit.php2.07 ▼1.296.18 ▼46.75
Add New Post /wp-admin/post-new.php2.07 ▼3.826.70 ▼93.14
Media Library /wp-admin/upload.php2.07 ▼1.165.88 ▼29.01

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Inspectlet - User Session Recording and Heatmaps
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.25 ▼1.371.67 ▼0.0740.77 ▼1.43
Dashboard /wp-admin2,222 ▲315.01 ▼0.87110.15 ▲12.8338.27 ▼5.69
Posts /wp-admin/edit.php2,105 ▲131.99 ▲0.0340.44 ▼1.3834.99 ▼3.19
Add New Post /wp-admin/post-new.php1,546 ▲1323.21 ▲0.28686.56 ▲102.7161.46 ▲13.64
Media Library /wp-admin/upload.php1,395 ▲104.19 ▼0.0398.04 ▼3.1043.87 ▲1.70

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_style was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the inspectlet_wp.css handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_register_style() in wp-content/plugins/inspectlet-heatmaps-and-user-session-recording/inspectlet-user-session-recording-and-heatmaps.php:11

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: traffic, session recording, inspectlet, analytics, heatmaps...

inspectlet-heatmaps-and-user-session-recording/inspectlet-user-session-recording-and-heatmaps.php 85% from 13 tests

The main PHP script in "Inspectlet - User Session Recording and Heatmaps" version 2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: The description should be shorter than 140 characters (currently 179 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("inspectlet-heatmaps-and-user-session-recording.php" instead of "inspectlet-user-session-recording-and-heatmaps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected44 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP18938
CSS1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
insp_logo_wp.png4.29KB2.57KB▼ 40.07%