84% heatmap-for-wp

Code Review | heatmap for Wordpress - Realtime analytics

WordPress plugin heatmap for Wordpress - Realtime analytics scored 84% from 54 tests.

About plugin

  • Plugin page: heatmap-for-wp
  • Plugin version: 0.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-5.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Feb 21, 2019
  • Number of updates: 43
  • Update frequency: every 42.9 days
  • Top authors: heatmap (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

4,000+ active / 98,021 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼6.30ms] Passed 4 tests

An overview of server-side resources used by heatmap for Wordpress - Realtime analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0936.45 ▼5.51
Dashboard /wp-admin3.40 ▲0.0948.01 ▼4.09
Posts /wp-admin/edit.php3.51 ▲0.1547.83 ▼2.22
Add New Post /wp-admin/post-new.php5.98 ▲0.0986.08 ▼13.38
Media Library /wp-admin/upload.php3.32 ▲0.0936.29 ▲1.41

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
heatmapWP_options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for heatmap for Wordpress - Realtime analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8014.47 ▲0.181.76 ▼0.3341.06 ▼0.99
Dashboard /wp-admin2,221 ▲334.89 ▼1.00109.73 ▼1.2272.13 ▲28.93
Posts /wp-admin/edit.php2,110 ▲182.01 ▼0.0439.05 ▼1.7035.52 ▼0.64
Add New Post /wp-admin/post-new.php1,531 ▼1123.11 ▲5.22668.10 ▲61.1949.89 ▼15.59
Media Library /wp-admin/upload.php1,403 ▲184.24 ▲0.0496.88 ▼5.0474.45 ▲29.66

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • heatmapWP_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/heatmap-for-wp/heatmap-for-wp.php:267

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

heatmap-for-wp/heatmap-for-wp.php Passed 13 tests

The primary PHP file in "heatmap for Wordpress - Realtime analytics" version 0.5.2 is used by WordPress to initiate all plugin functionality
88 characters long description:
Real-time analytics and event tracking for your WordPress site (see https://heatmap.com)

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
No dangerous file extensions were detected665 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP11249418
CSS23021243
JavaScript1004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity47.00
▷ Minimum class complexity47.00
▷ Maximum class complexity47.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods13.85%
▷ Public methods1246.15%
▷ Protected methods00.00%
▷ Private methods1453.85%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-16.png0.44KB0.56KB0.00%
assets/icon-32.png0.80KB0.98KB0.00%