10% extrawatch-pro

Code Review | ExtraWatch PRO (Live Stats, Heatmap, Click tracking, Download Monitor and more)

WordPress plugin ExtraWatch PRO (Live Stats, Heatmap, Click tracking, Download Monitor and more) scored10%from 54 tests.

About plugin

  • Plugin page: extrawatch-pro
  • Plugin version: 2.3.2697 PRO...
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 3, 2012
  • Latest release: Jun 19, 2020
  • Number of updates: 453
  • Update frequency: every 6.6 days
  • Top authors: matto3c (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

90+ active /39,162 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ExtraWatchEnvSetupWordpress::install() should not be called statically

Server metrics [RAM: ▼1.56MB] [CPU: ▼49.74ms] Passed 4 tests

Server-side resources used by ExtraWatch PRO (Live Stats, Heatmap, Click tracking, Download Monitor and more)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.43 ▼1.0412.17 ▼33.34
Dashboard /wp-admin2.45 ▼0.8513.54 ▼36.46
Posts /wp-admin/edit.php2.45 ▼0.9113.86 ▼34.68
Add New Post /wp-admin/post-new.php2.45 ▼3.4413.71 ▼94.48
Media Library /wp-admin/upload.php2.45 ▼0.7813.14 ▼27.54

Server storage [IO: ▲15.65MB] [DB: ▲0.02MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 967 new files
Database: 20 new tables, 9 new options
New tables
wp_extrawatch_uri2keyphrase_pos
wp_extrawatch_uri
wp_extrawatch_uri_post
wp_extrawatch_info
wp_extrawatch_goals
wp_extrawatch_cache
wp_extrawatch_blocked
wp_extrawatch_sql_scripts
wp_extrawatch_keyphrase
wp_extrawatch_config
...
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_extrawatchagentwidget
theysaidso_admin_options
widget_extrawatchvisitorswidget
widget_extrawatchuserswidget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for ExtraWatch PRO (Live Stats, Heatmap, Click tracking, Download Monitor and more)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.26 ▲0.061.97 ▼1.3042.49 ▼2.64
Dashboard /wp-admin2,194 ▲145.56 ▼0.0688.62 ▼0.4469.84 ▲23.45
Posts /wp-admin/edit.php2,111 ▲111.99 ▲0.0140.79 ▼1.4840.10 ▲1.08
Add New Post /wp-admin/post-new.php1,559 ▲2018.08 ▲0.06626.05 ▼14.00163.17 ▲100.70
Media Library /wp-admin/upload.php1,408 ▲144.24 ▲0.0598.34 ▼27.0361.12 ▲16.36

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ExtraWatchAgentWidget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie tables detected upon uninstall: 2 tables
    • wp_extrawatch_config
    • wp_extrawatch_ip2c
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_extrawatchvisitorswidget
    • widget_extrawatchuserswidget
    • widget_extrawatchagentwidget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 fix the following
  • 194× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/src/class.extrawatch.date.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/view/users.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/view/dm_edit_ext.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/src/class.ip2country.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/controller.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/ajax/visits.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/lang/romanian.utf-8.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/view/fullversion.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/lang/latvian.utf-8.php
    • > /wp-content/plugins/extrawatch-pro/components/com_extrawatch/lang/farsi.utf-8.php
  • 61× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/extrawatch-pro/components/com_extrawatch/test/unit/goals/ExtraWatchGoalsTest.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='.:/usr/share/php') in wp-content/plugins/extrawatch-pro/components/com_extrawatch/test/gui/ExtraWatchGUITestBase.php on line 3
    • > PHP Notice
      Trying to get property 'dbuser' of non-object in wp-content/plugins/extrawatch-pro/components/com_extrawatch/src/env/wordpress/class.extrawatch.db.wordpress.php on line 30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/extrawatch-pro/components/com_extrawatch/src/env/wordpress/extrawatch.php:52
    • > PHP Warning
      require_once(PHPUnit/Extensions/SeleniumTestCase.php): failed to open stream: No such file or directory in wp-content/plugins/extrawatch-pro/components/com_extrawatch/test/gui/ExtraWatchGUITestBase.php on line 3
    • > PHP Notice
      Trying to get property 'dbuser' of non-object in wp-content/plugins/extrawatch-pro/components/com_extrawatch/src/env/wordpress/class.extrawatch.db.wordpress.php on line 30
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/extrawatch-pro/includes/defines.php' (include_path='.:/usr/share/php') in wp-content/plugins/extrawatch-pro/components/com_extrawatch/css/extrawatch.css.php on line 29
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='.:/usr/share/php') in wp-content/plugins/extrawatch-pro/components/com_extrawatch/test/gui/ExtraWatchGUITestBase.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'PHPUnit/Extensions/SeleniumTestCase.php' (include_path='.:/usr/share/php') in wp-content/plugins/extrawatch-pro/components/com_extrawatch/test/gui/ExtraWatchGUITestBase.php on line 3
    • > PHP Warning
      require_once(PHPUnit/Autoload.php): failed to open stream: No such file or directory in wp-content/plugins/extrawatch-pro/components/com_extrawatch/test/unit/keywords/ExtraWatchVisitsTest.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 76% from 29 tests

readme.txt 81% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Latest Visitors refreshed in real-time), #2 (Location of Last visitor), #3 (Statistics and Analytics), #4 (Heatmap and visualized button clicks via Heat Map), #5 (Clicks on various elements by their ID on page), #6 (Location on a Map), #7 (Clicks and their IDs named as goals), #8 (Graphs with daily and weekly values), #9 (Download monitor monitors files your users downloaded), #10 (Last active users and ability to detect account which is shared among multiple IP addresses), #11 (Interactive chart with traffic distribution on your website - how your traffic flows from one page to another), #12 (Report of visits from search engines and positions from which people found your website), #13 (Extension keeps an eye on your database table sizes as weel), #14 (Monitoring directory sizes), #15 (Various goals definition and how they change in time), #16 (Ability to block spam bots and other users violating your website), #17 (Receiving an email when some goal was reached - eg. a particular button was clicked), #18 (Settings with selection of 42 world languages)
  • Requires at least: The plugin version is formatted incorrectly
  • Tags: Please reduce the number of tags, currently 37 tag instead of maximum 10
Please take inspiration from this readme.txt

extrawatch-pro/extrawatch.php 69% from 13 tests

The main file in "ExtraWatch PRO (Live Stats, Heatmap, Click tracking, Download Monitor and more)" v. 2.3.2697 PRO... serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 437 characters long)
  • Version: Plugin version number should only contain digits separated by dots (ex. "1.0.3" instead of "2.3.2697 PRO...")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("extrawatch-pro.php" instead of "extrawatch.php")
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 79 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please fix the following items
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/extrawatch-pro/components/com_extrawatch/lang/addToAllFiles.bat
96,753 lines of code in 306 files:
LanguageFilesBlank linesComment linesLines of code
PHP22010,2317,38358,121
JavaScript251,0971,17324,123
INI283411,079
CSS64171251,553
SQL351330963
SVG100499
XML13374404
HTML3009
DOS Batch1102

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.09
Average class complexity27.73
▷ Minimum class complexity1.00
▷ Maximum class complexity387.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces4
Traits0
Classes71
▷ Abstract classes22.82%
▷ Concrete classes6997.18%
▷ Final classes11.45%
Methods932
▷ Static methods717.62%
▷ Public methods90897.42%
▷ Protected methods80.86%
▷ Private methods161.72%
Functions76
▷ Named functions76100.00%
▷ Anonymous functions00.00%
Constants490
▷ Global constants44891.43%
▷ Class constants428.57%
▷ Public constants42100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
516 compressed PNG files occupy 4.41MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/com_extrawatch/img/flags/nz.png0.86KB0.93KB0.00%
administrator/components/com_extrawatch/img/icons/sizes.png0.57KB0.43KB▼ 23.83%
components/com_extrawatch/img/icons/linux_suse.png0.94KB0.89KB▼ 4.80%
components/com_extrawatch/img/icons/progress_bar.png0.13KB0.11KB▼ 18.84%
administrator/components/com_extrawatch/img/icons/emails.png0.40KB0.31KB▼ 23.23%