72% qa-heatmap-analytics

Code Review | QA Analytics

WordPress plugin QA Analytics scored72%from 54 tests.

About plugin

  • Plugin page: qa-heatmap-analytics
  • Plugin version: 3.5.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.0
  • WordPress version: 6.3.1
  • First release: Aug 19, 2020
  • Latest release: Nov 14, 2023
  • Number of updates: 140
  • Update frequency: every 8.6 days
  • Top authors: quarka (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /25,926 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.19MB] [CPU: ▲42.30ms] Passed 4 tests

Analyzing server-side resources used by QA Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /7.64 ▲4.1797.79 ▲60.17
Dashboard /wp-admin7.51 ▲4.2190.54 ▲39.06
Posts /wp-admin/edit.php7.62 ▲4.2697.22 ▲46.22
Add New Post /wp-admin/post-new.php10.09 ▲4.20130.27 ▲39.18
Media Library /wp-admin/upload.php7.43 ▲4.2077.85 ▲44.72
Help /wp-admin/admin.php?page=qahm-help7.4179.69
Settings /wp-admin/admin.php?page=qahm-config7.4193.79
Data Portal /wp-admin/admin.php?page=qahm-dataportal7.4074.49
License Activation /wp-admin/admin.php?page=qahm-license7.4160.22
SEO Analysis /wp-admin/admin.php?page=qahm-seo7.4162.56
Real-Time View /wp-admin/admin.php?page=qahm-realtime7.4259.36
Heatmap Manager /wp-admin/admin.php?page=qahm-heatmap7.4265.02
Home /wp-admin/admin.php?page=qahm-home7.4261.28

Server storage [IO: ▲8.79MB] [DB: ▲0.08MB] 67% from 3 tests

Input-output and database impact of this plugin
These are issues you should consider
  • Illegal file modification detected: 18 files (5.22KB) outside of "wp-content/plugins/qa-heatmap-analytics/" and "wp-content/uploads/"
    • (new file) wp-content/qa-heatmap-analytics-data/.donotbackup
    • (new file) qa_gsc_query_log_version
    • (new file) wp-content/qa-heatmap-analytics-data/cron_backup
    • (new file) wp-content/qa-heatmap-analytics-data/readers/finish/.empty
    • (new file) wp-content/qa-heatmap-analytics-data/f9e61b0da7ef48ec_tracking_hash.php
    • (new file) wp-content/qa-heatmap-analytics-data/cache/.empty
    • (new file) wp-content/qa-heatmap-analytics-data/cron_status
    • (new file) wp-content/qa-heatmap-analytics-data/heatmap-view-work/.empty
    • (new file) wp-content/qa-heatmap-analytics-data/log/qalog.txt
    • (new file) wp-content/qa-heatmap-analytics-data/readers/dbin/.empty
    • ...
Filesystem: 806 new files
Database: 10 new tables, 25 new options
New tables
wp_qa_utm_campaigns
wp_qahm_recterm
wp_qa_page_version_hist
wp_qa_utm_sources
wp_qa_search_log
wp_qa_readers
wp_qa_gsc_query_log
wp_qa_pages
wp_qa_utm_media
wp_qa_pv_log
New WordPress options
widget_recent-posts
qahm_siteinfo
qahm_heatmap_measure_max
theysaidso_admin_options
qahm_heatmap_sort_rec
widget_recent-comments
qahm_recterm_version
qahm_license_message
qahm_goals
qahm_access_role
...

Browser metrics Passed 4 tests

Checking browser requirements for QA Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,151 ▲36419.49 ▲5.2369.67 ▲67.8937.06 ▼6.45
Dashboard /wp-admin2,567 ▲3979.94 ▲4.29225.83 ▲128.0598.82 ▲60.55
Posts /wp-admin/edit.php2,152 ▲491.94 ▼0.0243.78 ▲0.5536.33 ▲1.44
Add New Post /wp-admin/post-new.php1,457 ▼6917.90 ▼5.36842.00 ▲138.6546.49 ▼3.75
Media Library /wp-admin/upload.php1,446 ▲494.19 ▲0.03127.52 ▲23.1896.00 ▲49.51
Help /wp-admin/admin.php?page=qahm-help1,2704.1348.4750.06
Settings /wp-admin/admin.php?page=qahm-config2,2884.4184.0181.88
Data Portal /wp-admin/admin.php?page=qahm-dataportal1,0813.7251.3163.67
License Activation /wp-admin/admin.php?page=qahm-license1,0914.3847.5147.18
SEO Analysis /wp-admin/admin.php?page=qahm-seo9174.4152.4824.70
Real-Time View /wp-admin/admin.php?page=qahm-realtime1,0984.6853.2142.56
Heatmap Manager /wp-admin/admin.php?page=qahm-heatmap1,0994.2547.9536.94
Home /wp-admin/admin.php?page=qahm-home1,1186.2789.6753.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

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/admin.php?page=qahm-home
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+39
    file_get_contents(wp-content/qa-heatmap-analytics-data/view/f9e61b0da7ef48ec/summary/days_access.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=qahm-home
    • > POST request to /wp-admin/admin-ajax.php
    • > Warning in wp-admin/includes/class-wp-filesystem-direct.php+39
    file_get_contents(wp-content/qa-heatmap-analytics-data/cache/heatmap_list.php): failed to open stream: No such file or directory

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
Please fix the following
  • 466× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/qa-heatmap-analytics/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/qa-heatmap-analytics/vendor/google/apiclient-services/src/AnalyticsReporting/Pivot.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/qa-heatmap-analytics/vendor/google/apiclient-services/src/SearchConsole/SitemapsListResponse.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/qa-heatmap-analytics/vendor/google/apiclient-services/src/Analytics/McfData.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Collection' not found in wp-content/plugins/qa-heatmap-analytics/vendor/google/apiclient-services/src/Analytics/AccountPermissions.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/qa-heatmap-analytics/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\MailHandler' not found in wp-content/plugins/qa-heatmap-analytics/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/qa-heatmap-analytics/vendor/google/apiclient-services/src/Oauth2/Userinfo.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/qa-heatmap-analytics/vendor/google/apiclient-services/src/Analytics/McfDataRowsConversionPathValue.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpseclib\\Crypt\\Base' not found in wp-content/plugins/qa-heatmap-analytics/vendor/phpseclib/phpseclib/phpseclib/Crypt/RC4.php:54

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=qahm-seo
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of null (setting 'innerHTML')" "TypeError: Cannot set properties of null (setting 'innerHTML')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/qa-heatmap-analytics/js/admin-page-seo.js?ver=3.5.0.0:547:25)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=qahm-seo
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot set properties of null (setting 'innerHTML')
    • > GET request to /wp-admin/admin.php?page=qahm-home
    • > Network (severe)
    wp-admin/admin-ajax.php - Failed to load resource: the server responded with a status of 409 (Conflict)
    • > GET request to /wp-admin/admin.php?page=qahm-home
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of null (setting 'innerHTML')" "TypeError: Cannot set properties of null (setting 'innerHTML')\n at qahm.drawAllTablesAjax (/wp-content/plugins/qa-heatmap-analytics/js/admin-page-statistics.js?ver=3.5.0.0:936:31)\n at /wp-content/plugins/qa-heatmap-analytics/js/admin-page-statistics.js?ver=3.5.0.0:508:18\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=qahm-home
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'length')" "TypeError: Cannot read properties of null (reading 'length')\n at Object.acquireContext (/wp-content/plugins/qa-heatmap-analytics/js/lib/chart/chart.min.js?ver=3.5.0.0:7:86074)\n at tn.construct (/wp-content/plugins/qa-heatmap-analytics/js/lib/chart/chart.min.js?ver=3.5.0.0:7:102546)\n at new tn (/wp-content/plugins/qa-heatmap-analytics/js/lib/chart/chart.min.js?ver=3.5.0.0:7:102287)\n at /wp-content/plugins/qa-heatmap-analytics/js/admin-page-statistics.js?ver=3.5.0.0:568:36\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=qahm-home
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'getContext')" "TypeError: Cannot read properties of null (reading 'getContext')\n at qahm.statsDrawChartOne (/wp-content/plugins/qa-heatmap-analytics/js/admin-page-statistics.js?ver=3.5.0.0:2173:50)\n at Array.\u003Canonymous> (/wp-content/plugins/qa-heatmap-analytics/js/admin-page-statistics.js?ver=3.5.0.0:649:10)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
10 plugin tags: collect events, clickmap, statistics, analytics, tracking...

qa-heatmap-analytics/qahm.php 92% from 13 tests

The principal PHP file in "QA Analytics" v. 3.5.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("qa-heatmap-analytics.php" instead of "qahm.php")

Code Analysis 97% from 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
Success! There were no dangerous files found in this plugin123,636 lines of code in 751 files:
LanguageFilesBlank linesComment linesLines of code
PHP62812,71145,43896,844
JavaScript361,9892,25015,030
Markdown291,71104,991
CSS235632454,350
JSON21002,194
YAML6243116
SVG66092
Dockerfile18010
make1409

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 654)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity17.65
▷ Minimum class complexity1.00
▷ Maximum class complexity697.00
Average method complexity3.10
▷ Minimum method complexity1.00
▷ Maximum method complexity654.00
Code structure
Namespaces54
Interfaces36
Traits8
Classes553
▷ Abstract classes91.63%
▷ Concrete classes54498.37%
▷ Final classes274.96%
Methods4,811
▷ Static methods2645.49%
▷ Public methods4,29289.21%
▷ Protected methods1994.14%
▷ Private methods3206.65%
Functions221
▷ Named functions9040.72%
▷ Anonymous functions13159.28%
Constants587
▷ Global constants7312.44%
▷ Class constants51487.56%
▷ Public constants514100.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
20 PNG files occupy 0.89MB with 0.56MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/qahm-icon.png15.31KB5.04KB▼ 67.06%
img/quokka-icon.png19.35KB0.52KB▼ 97.31%
img/dataportal8.png81.90KB25.93KB▼ 68.34%
img/pict_02.png3.47KB2.10KB▼ 39.61%
img/pict_01.png3.51KB2.09KB▼ 40.33%