62% tc-visitors-tracker

Code Review | Visitors Tracker by tech-c.net

WordPress plugin Visitors Tracker by tech-c.net scored62%from 54 tests.

About plugin

  • Plugin page: tc-visitors-tracker
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0
  • WordPress version: 6.3.1
  • First release: Nov 21, 2018
  • Latest release: Nov 21, 2018
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: techcnet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /921 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼10.18ms] Passed 4 tests

Analyzing server-side resources used by Visitors Tracker by tech-c.net
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.59 ▲1.1333.42 ▼7.30
Dashboard /wp-admin3.35 ▲0.0551.21 ▼5.59
Posts /wp-admin/edit.php4.95 ▲1.6041.22 ▼21.61
Add New Post /wp-admin/post-new.php5.93 ▲0.04101.72 ▼6.23
Media Library /wp-admin/upload.php3.27 ▲0.0440.12 ▼1.30
Visitors Tracker by tech-c.net /wp-admin/options-general.php?page=tc_visitors_tracker_options_slug3.4935.66

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 351 new files
Database: 1 new table, 7 new options
New tables
wp_tc_visitors_tracker
New WordPress options
tc_visitors_tracker_db_version
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Visitors Tracker by tech-c.net
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.23 ▼0.062.28 ▲0.4543.47 ▲6.73
Dashboard /wp-admin2,202 ▲255.61 ▼0.0692.15 ▲2.0240.48 ▼3.65
Posts /wp-admin/edit.php2,101 ▲12.01 ▼0.0939.22 ▲0.8435.20 ▼0.34
Add New Post /wp-admin/post-new.php1,529 ▲222.92 ▼0.22648.40 ▼50.3155.45 ▼3.46
Media Library /wp-admin/upload.php1,404 ▲44.15 ▼0.04100.90 ▼13.7645.53 ▼1.38
Visitors Tracker by tech-c.net /wp-admin/options-general.php?page=tc_visitors_tracker_options_slug2,3352.2240.7537.24

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • tc_visitors_tracker_db_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=tc_visitors_tracker_options_slug
    • > Notice in wp-content/plugins/tc-visitors-tracker/pageviews.php+51
    Undefined index: view
    • > GET request to /wp-admin/options-general.php?page=tc_visitors_tracker_options_slug
    • > Notice in wp-content/plugins/tc-visitors-tracker/pageviews.php+352
    Undefined index: start

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
The following issues need your attention
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/tc-visitors-tracker/about.php
    • > /wp-content/plugins/tc-visitors-tracker/pageviews.php
    • > /wp-content/plugins/tc-visitors-tracker/tc-visitors-tracker.php
    • > /wp-content/plugins/tc-visitors-tracker/update-geoip.php
    • > /wp-content/plugins/tc-visitors-tracker/settings.php
    • > /wp-content/plugins/tc-visitors-tracker/viewtime.php
    • > /wp-content/plugins/tc-visitors-tracker/database.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=tc_visitors_tracker_options_slug
    • > Network (severe)
    wp-content/plugins/tc-visitors-tracker/images/country/-.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: visitors, views, time, statistic

tc-visitors-tracker/tc-visitors-tracker.php Passed 13 tests

This is the main PHP file of "Visitors Tracker by tech-c.net" version 2.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
43 characters long description:
This plugin logs visitors of your homepage.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
These items require your attention
  • You should never include executable (binary) or otherwise dangerous files in your plugin
    • .bin - Binary Executable in Windows, macOS, Linux
      • wp-content/plugins/tc-visitors-tracker/IP2Location/IP2LOCATION-LITE-DB1.BIN
      • wp-content/plugins/tc-visitors-tracker/IP2Location/IP2LOCATION-LITE-DB1.IPV6.BIN
7,102 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP106619295,121
CSS268481,432
PO File2156156476
JavaScript111873

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 457)
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity345.00
▷ Minimum class complexity155.00
▷ Maximum class complexity535.00
Average method complexity16.95
▷ Minimum method complexity1.00
▷ Maximum method complexity457.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods920.45%
▷ Public methods1431.82%
▷ Protected methods00.00%
▷ Private methods3068.18%
Functions18
▷ Named functions1688.89%
▷ Anonymous functions211.11%
Constants48
▷ Global constants00.00%
▷ Class constants48100.00%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
328 compressed PNG files occupy 0.25MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/country/co.png0.53KB0.84KB0.00%
images/country/so.png0.42KB0.66KB0.00%
images/country/ie.png0.54KB0.62KB0.00%
images/country/rw.png0.66KB0.89KB0.00%
images/country/bf.png0.69KB0.86KB0.00%