77% extrawatch

Code Review | ExtraWatch (Live Stats, Realtime tracking, Visits on a map and more)

WordPress plugin ExtraWatch (Live Stats, Realtime tracking, Visits on a map and more) scored77%from 54 tests.

About plugin

  • Plugin page: extrawatch
  • Plugin version: 4.0.53
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 27, 2012
  • Latest release: Feb 3, 2021
  • Number of updates: 484
  • Update frequency: every 6.8 days
  • Top authors: matto3c (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /63,775 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.17MB] [CPU: ▼0.21ms] Passed 4 tests

A check of server-side resources used by ExtraWatch (Live Stats, Realtime tracking, Visits on a map and more)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.67 ▲0.2140.01 ▲1.31
Dashboard /wp-admin3.51 ▲0.2147.84 ▲3.49
Posts /wp-admin/edit.php3.56 ▲0.2150.11 ▲2.48
Add New Post /wp-admin/post-new.php6.03 ▲0.1484.13 ▼8.13
Media Library /wp-admin/upload.php3.37 ▲0.1439.32 ▲5.98
Settings /wp-admin/admin.php?page=extrawatch-settings3.3129.36
ExtraWatch /wp-admin/admin.php?page=extrawatch3.3129.88

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for ExtraWatch (Live Stats, Realtime tracking, Visits on a map and more)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲5014.58 ▲0.011.77 ▲0.0243.61 ▲0.26
Dashboard /wp-admin2,217 ▲405.50 ▼0.0481.03 ▼5.3276.70 ▲34.70
Posts /wp-admin/edit.php2,128 ▲281.99 ▲0.0139.26 ▲2.4032.74 ▼1.85
Add New Post /wp-admin/post-new.php1,545 ▲623.70 ▲0.57633.28 ▲24.3964.29 ▼1.32
Media Library /wp-admin/upload.php1,422 ▲224.11 ▼0.0493.86 ▲0.0173.89 ▲33.91
Settings /wp-admin/admin.php?page=extrawatch-settings9111.9922.9825.86
ExtraWatch /wp-admin/admin.php?page=extrawatch9031.9922.4640.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=extrawatch
    • > Notice in wp-content/plugins/extrawatch/ew-plg-common/cms/ExtraWatchWordpressSpecific.php+126
    Undefined index: action
    • > GET request to /wp-admin/admin.php?page=extrawatch
    • > Notice in wp-content/plugins/extrawatch/ew-plg-common/cms/ExtraWatchWordpressSpecific.php+120
    Undefined index: page
    • > GET request to /wp-admin/admin.php?page=extrawatch
    • > Notice in wp-content/plugins/extrawatch/ew-plg-common/cms/ExtraWatchWordpressSpecific.php+120
    Undefined index: extrawatch-terms

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/extrawatch/extrawatch.php:41
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/extrawatch/ew-plg-common/assets/settings.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/extrawatch/assets/html/settings.php:13
    • > PHP Fatal error
      Class ExtraWatchPrestashopSpecific contains 11 abstract methods and must therefore be declared abstract or implement the remaining methods (ExtraWatchCMSSpecific::getComponentPage, ExtraWatchCMSSpecific::getPluginsURL, ExtraWatchCMSSpecific::createNonce, ...) in wp-content/plugins/extrawatch/ew-plg-common/cms/ExtraWatchPrestashopSpecific.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/extrawatch/extrawatch-social.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/extrawatch/assets/html/create-account.php:13
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/extrawatch/ew-plg-common/assets/create-account.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (**Visitors** - contains visitor information, refreshed in real time, traffic sources with graphs (google, facebook, twitter, instagram, youtube, linkedin)), #2 (**Map** - displays visitors in real time on a map), #3 (**Click Heatmap** - displays visitor's mouse clicks), #4 (**Stats** - page load stats per day), #5 (**Bots** - see activity of google bot, yahoo, yandex and other website spiders and crawlers), #6 (**Referrers** - where most of the visits came from)
  • Requires at least: The plugin version is formatted incorrectly
Please take inspiration from this readme.txt

extrawatch/extrawatch.php 92% from 13 tests

Analyzing the main PHP file in "ExtraWatch (Live Stats, Realtime tracking, Visits on a map and more)" version 4.0.53
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 263 characters long)

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
Everything looks great! No dangerous files found in this plugin1,416 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP254553581,415
HTML1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.53
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.31
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods187
▷ Static methods10.53%
▷ Public methods17191.44%
▷ Protected methods00.00%
▷ Private methods168.56%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants38
▷ Global constants718.42%
▷ Class constants3181.58%
▷ Public constants31100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
16 PNG files occupy 1.84MB with 0.96MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ew-plg-common/assets/img/extrawatch-logo-16x16.png0.86KB0.84KB▼ 2.51%
assets/banner-772x250.png127.69KB30.24KB▼ 76.32%
screenshot-4.png111.53KB38.99KB▼ 65.04%
ew-plg-common/assets/img/logo.png12.03KB4.94KB▼ 58.98%
assets/extrawatch-logo-text.png12.03KB4.94KB▼ 58.98%