90% wp-hotjar

Code Review | WP Hotjar

WordPress plugin WP Hotjar scored90%from 54 tests.

About plugin

  • Plugin page: wp-hotjar
  • Plugin version: 0.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9.5
  • WordPress version: 6.3.1
  • First release: Jun 22, 2017
  • Latest release: Apr 21, 2018
  • Number of updates: 8
  • Update frequency: every 78.4 days
  • Top authors: thiagogsrwp (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /9,769 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by WP Hotjar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0628.79 ▼16.76
Dashboard /wp-admin3.33 ▼0.0253.59 ▼14.92
Posts /wp-admin/edit.php3.38 ▲0.0246.43 ▼5.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.29 ▼17.99
Media Library /wp-admin/upload.php3.25 ▲0.0240.06 ▲0.65

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Hotjar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.28 ▼0.071.78 ▲0.0347.06 ▲2.06
Dashboard /wp-admin2,211 ▲345.61 ▼0.0585.68 ▼4.4639.59 ▲1.34
Posts /wp-admin/edit.php2,116 ▲131.99 ▲0.0335.36 ▼4.7632.24 ▼4.11
Add New Post /wp-admin/post-new.php1,549 ▲2123.16 ▼0.09693.66 ▲60.6064.42 ▲6.63
Media Library /wp-admin/upload.php1,413 ▲104.16 ▼0.12112.62 ▲9.3148.47 ▼0.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 Passed 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
1 plugin tags: hotjar

wp-hotjar/wp-hotjar.php Passed 13 tests

The principal PHP file in "WP Hotjar" v. 0.0.3 is loaded by WordPress automatically on each request
65 characters long description:
Hotjar connector that avoids connections when logged in wp-admin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected182 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP64945138
PO File1101042
Markdown1102

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.67
▷ Minimum class complexity1.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods10
▷ Static methods440.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions0
▷ Named functions00.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
There were not PNG files found in your plugin