84% userheat

Code Review | UserHeat Plugin

WordPress plugin UserHeat Plugin scored84%from 54 tests.

About plugin

  • Plugin page: userheat
  • Plugin version: 1.1.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.6.2
  • WordPress version: 6.3.1
  • First release: Mar 7, 2016
  • Latest release: Mar 5, 2021
  • Number of updates: 50
  • Update frequency: every 36.9 days
  • Top authors: kunikiya (74%)ulharada (20%)userlocal (10%)

Code review

54 tests

User reviews

1 review

Install metrics

8,000+ active /26,587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

This is a short check of server-side resources used by UserHeat Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.00 ▼2.96
Dashboard /wp-admin3.33 ▼0.0242.16 ▼20.74
Posts /wp-admin/edit.php3.38 ▲0.0245.63 ▼3.59
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.69 ▼19.75
Media Library /wp-admin/upload.php3.25 ▲0.0235.01 ▲1.33

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

UserHeat Plugin: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.42 ▼0.231.60 ▲0.0537.97 ▼6.60
Dashboard /wp-admin2,214 ▲345.62 ▼0.1985.26 ▲1.7738.30 ▼4.19
Posts /wp-admin/edit.php2,116 ▲161.99 ▲0.0136.61 ▼2.6535.50 ▲1.95
Add New Post /wp-admin/post-new.php1,547 ▲2118.51 ▼4.94639.60 ▼12.4764.68 ▲15.58
Media Library /wp-admin/upload.php1,413 ▲194.15 ▼0.2593.47 ▼5.8642.73 ▼2.25

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • 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 shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/userheat/admin.php:2
    • > PHP Notice
      Undefined variable: siteDomain in wp-content/plugins/userheat/admin.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: click, pageviews, google analytics, japanese, conversion tracking...

userheat/userheat.php Passed 13 tests

The main file in "UserHeat Plugin" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
36 characters long description:
heatmap analytics tool quick install

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,291 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS4780848
PHP23047236
PO File25961202
JavaScript11175

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
9 PNG files occupy 1.18MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/ui.png578.49KB126.85KB▼ 78.07%
img/logo.png17.33KB1.41KB▼ 91.86%
img/kind_heatmap/endarea.png40.97KB42.99KB0.00%
img/kind_heatmap/mousemove.png89.67KB96.41KB0.00%
img/kind_heatmap/withdrawal.png25.33KB26.51KB0.00%