78% track-visitors

Code Review | Track Visitors

WordPress plugin Track Visitors scored78%from 54 tests.

About plugin

  • Plugin page: track-visitors
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.7
  • WordPress version: 6.3.1
  • First release: May 6, 2021
  • Latest release: May 6, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: abdulhadicse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /487 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.03MB] [CPU: ▼2.23ms] Passed 4 tests

An overview of server-side resources used by Track Visitors
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0446.84 ▲5.86
Dashboard /wp-admin3.33 ▲0.0348.63 ▼6.20
Posts /wp-admin/edit.php3.38 ▲0.0350.48 ▲0.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0388.38 ▼6.93
Media Library /wp-admin/upload.php3.26 ▲0.0337.72 ▲3.73

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
wpvt_visitors_tracker
widget_theysaidso_widget
widget_recent-comments
visitor_tracker_installed
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
visitor_tracker_version

Browser metrics Passed 4 tests

Checking browser requirements for Track Visitors
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,931 ▲16013.61 ▼0.799.60 ▲7.6546.60 ▲4.58
Dashboard /wp-admin2,203 ▲155.80 ▲0.9194.15 ▼7.9138.96 ▼2.50
Posts /wp-admin/edit.php2,089 ▼01.97 ▲0.0036.33 ▼0.4730.83 ▼5.59
Add New Post /wp-admin/post-new.php1,546 ▲3223.28 ▲5.57669.01 ▼11.3158.86 ▼3.13
Media Library /wp-admin/upload.php1,388 ▼04.22 ▼0.04102.97 ▼7.3141.42 ▼6.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • visitor_tracker_version
    • visitor_tracker_installed
    • db_upgraded
    • wpvt_visitors_tracker
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | 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× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/track-visitors/index.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/track-visitors/assets/views/display.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/track-visitors/assets/views/display.php:11
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/track-visitors/assets/views/display.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/track-visitors/assets/views/display.php on line 7
    • > PHP Notice
      Undefined variable: value in wp-content/plugins/track-visitors/assets/views/display.php on line 4
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/track-visitors/assets/views/display.php on line 7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/track-visitors/assets/views/display.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: ip address, visitor tracker, visitor analysis, visitor, visitor ip tracker...

track-visitors/wp-visitors-tracker.php 85% from 13 tests

The main PHP script in "Track Visitors" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("track-visitors.php" instead of "wp-visitors-tracker.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin185 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP324121126
CSS18046
JavaScript21413

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods9
▷ Static methods111.11%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.53KB8.79KB▼ 62.62%