72% waypanel-heatmap-analysis

Code Review | WayPanel - Heatmap Analysis

WordPress plugin WayPanel - Heatmap Analysis scored72%from 54 tests.

About plugin

  • Plugin page: waypanel-heatmap-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 21, 2018
  • Latest release: Aug 21, 2018
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: sawrage (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /637 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.72ms] Passed 4 tests

Analyzing server-side resources used by WayPanel - Heatmap Analysis
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0741.16 ▲3.70
Dashboard /wp-admin3.37 ▲0.0645.39 ▼0.49
Posts /wp-admin/edit.php3.48 ▲0.1245.30 ▼8.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0892.53 ▼6.45
Media Library /wp-admin/upload.php3.29 ▲0.0633.23 ▲0.86
Waypanel.com /wp-admin/options-general.php?page=waypanel-heatmap3.2530.55

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

WayPanel - Heatmap Analysis: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.66 ▼0.904.96 ▲3.2443.36 ▲1.71
Dashboard /wp-admin2,214 ▲254.86 ▼0.99101.22 ▼6.7538.42 ▼1.80
Posts /wp-admin/edit.php2,097 ▲112.01 ▼0.0134.85 ▼1.9032.05 ▼2.43
Add New Post /wp-admin/post-new.php1,530 ▼618.46 ▼4.91604.06 ▼71.1248.69 ▼15.20
Media Library /wp-admin/upload.php1,396 ▲84.12 ▼0.0796.70 ▼3.5644.97 ▲0.90
Waypanel.com /wp-admin/options-general.php?page=waypanel-heatmap8352.0223.2328.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=waypanel-heatmap
    • > Notice in wp-content/plugins/waypanel-heatmap-analysis/admin/partials/waypanel-heatmap-admin-display.php+34
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/waypanel-heatmap-analysis/public/partials/waypanel-heatmap-public-display.php
  • 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/waypanel-heatmap-analysis/admin/partials/waypanel-heatmap-admin-display.php:15

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === waypanel-heatmap-analysis === )
You can look at the official readme.txt

waypanel-heatmap-analysis/waypanel-heatmap.php 85% from 13 tests

The entry point to "WayPanel - Heatmap Analysis" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("waypanel-heatmap-analysis.php" instead of "waypanel-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
No dangerous file extensions were detected630 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
XML760389
PHP12150576235
JavaScript24546
CSS2080

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity4.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.91MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
preview3.png147.55KB46.01KB▼ 68.82%
preview5.png151.90KB46.02KB▼ 69.71%
preview4.png139.03KB42.84KB▼ 69.19%
preview2.png225.15KB66.40KB▼ 70.51%
preview1.png264.30KB71.60KB▼ 72.91%