73% wp-light-heatmap

Code Review | WP Light Heatmap

WordPress plugin WP Light Heatmap scored 73% from 54 tests.

About plugin

  • Plugin page: wp-light-heatmap
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 3, 2020
  • Latest release: Mar 3, 2020
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wplightheatmap (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 520 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.56MB] [CPU: ▼15.39ms] Passed 4 tests

A check of server-side resources used by WP Light Heatmap
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.17 ▲0.96
Dashboard /wp-admin3.42 ▲0.1144.91 ▼5.06
Posts /wp-admin/edit.php3.53 ▲0.1747.29 ▼2.23
Add New Post /wp-admin/post-new.php3.29 ▼2.5938.85 ▼55.22
Media Library /wp-admin/upload.php3.34 ▲0.1136.91 ▲4.66

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 31 new files
Database: 1 new table, 7 new options
New tables
wp_light_heatmap_dots
New WordPress options
db_upgraded
theysaidso_admin_options
wp_light_heatmap_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

WP Light Heatmap: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,959 ▲22413.66 ▼0.739.26 ▲7.3842.06 ▼5.23
Dashboard /wp-admin2,232 ▲504.94 ▲0.07102.78 ▼3.6439.72 ▼2.02
Posts /wp-admin/edit.php2,118 ▲292.06 ▲0.0736.42 ▼0.7531.82 ▼5.30
Add New Post /wp-admin/post-new.php1,538 ▲523.19 ▲0.17615.37 ▼17.6453.67 ▼6.61
Media Library /wp-admin/upload.php1,417 ▲294.22 ▼0.0195.88 ▼11.4642.01 ▼6.24

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/wp-light-heatmap/uninstall.php+59
    Undefined variable: options
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_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
Even though no errors were found, 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
The following issues need your attention
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-light-heatmap/public/partials/wp_light_heatmap-public-display.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-light-heatmap/core/wp_light_heatmap_includes.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-light-heatmap/core/wp_light_heatmap_calculate.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-light-heatmap/admin/partials/wp_light_heatmap-admin-display.php:14

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 93% 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
5 plugin tags: analytics, clickmap, heat map, heatmap, click map

wp-light-heatmap/wp_light_heatmap.php 85% from 13 tests

The primary PHP file in "WP Light Heatmap" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-light-heatmap.php" instead of "wp_light_heatmap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,039 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP16199718526
JavaScript537102268
CSS24516245

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity1.30
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods27
▷ Static methods311.11%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.57MB with 0.48MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png585.65KB94.18KB▼ 83.92%