64% smart-visitor-tracker

Code Review | Smart Visitor Tracker

WordPress plugin Smart Visitor Tracker scored64%from 54 tests.

About plugin

  • Plugin page: smart-visitor-tra...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.3
  • WordPress version: 6.3.1
  • First release: Dec 4, 2019
  • Latest release: Dec 5, 2019
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: pulsemediagroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /698 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.54MB] [CPU: ▼50.72ms] Passed 4 tests

Analyzing server-side resources used by Smart Visitor Tracker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.45 ▼1.0112.56 ▼29.44
Dashboard /wp-admin2.46 ▼0.8413.04 ▼44.12
Posts /wp-admin/edit.php2.46 ▼0.8911.68 ▼40.93
Add New Post /wp-admin/post-new.php2.46 ▼3.4212.50 ▼88.40
Media Library /wp-admin/upload.php2.46 ▼0.7713.44 ▼24.67

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
wp_vdcustom_data
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Visitor Tracker
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲11513.51 ▼0.848.29 ▲6.4542.51 ▼1.52
Dashboard /wp-admin2,213 ▲365.56 ▼0.0992.69 ▼1.0637.64 ▼4.66
Posts /wp-admin/edit.php2,121 ▲212.02 ▼0.0039.69 ▼1.2734.77 ▼6.52
Add New Post /wp-admin/post-new.php1,543 ▲1423.02 ▲0.07624.49 ▼33.3561.87 ▲6.33
Media Library /wp-admin/upload.php1,421 ▲214.11 ▼0.05101.56 ▼1.5042.96 ▼0.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/smart-visitor-tracker/class-visitor-popup.php+75
    session_start(): A session had already been started - ignoring
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_vdcustom_data
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/smart-visitor-tracker/visitor-admin-data.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/smart-visitor-tracker/visitor-admin-data.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-visitor-tracker/class-visitor-popup.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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
3 plugin tags: smart, visitor, tracker

smart-visitor-tracker/smart-visitor-tracker.php Passed 13 tests

The main PHP file in "Smart Visitor Tracker" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
Smart Visitor Tracker Plugin to keep and track visitor IP details in deep.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected412 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP54741306
CSS18256
JavaScript15450

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin