78% hitsteps-visitor-manager

Code Review | Hitsteps Web Analytics

WordPress plugin Hitsteps Web Analytics scored78%from 54 tests.

About plugin

  • Plugin page: hitsteps-visitor-...
  • Plugin version: 5.87
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-6.2.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2013
  • Latest release: Oct 14, 2023
  • Number of updates: 1
  • Update frequency: every 365.0 days

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /118,634 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▼5.28ms] Passed 4 tests

Analyzing server-side resources used by Hitsteps Web Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7540.48 ▲4.22
Dashboard /wp-admin4.05 ▲0.7450.89 ▼0.25
Posts /wp-admin/edit.php3.93 ▲0.5737.01 ▼16.04
Add New Post /wp-admin/post-new.php6.56 ▲0.6890.35 ▼7.92
Media Library /wp-admin/upload.php3.91 ▲0.6839.20 ▲3.09
Hitsteps /wp-admin/options-general.php?page=hitsteps-visitor-manager/hitsteps.php3.8738.02

Server storage [IO: ▲0.51MB] [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: 28 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_hst_stats
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_hst_support

Browser metrics Passed 4 tests

Checking browser requirements for Hitsteps Web Analytics
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲21214.35 ▼0.002.04 ▲0.4745.31 ▲7.43
Dashboard /wp-admin2,354 ▲1745.59 ▼0.1383.42 ▼2.6239.09 ▼2.81
Posts /wp-admin/edit.php2,119 ▲192.03 ▲0.0434.83 ▼6.0235.37 ▼2.04
Add New Post /wp-admin/post-new.php1,554 ▲2618.15 ▼4.93639.22 ▼42.5960.99 ▲3.18
Media Library /wp-admin/upload.php1,418 ▲214.28 ▲0.0493.12 ▼4.0343.27 ▼0.14
Hitsteps /wp-admin/options-general.php?page=hitsteps-visitor-manager/hitsteps.php1,4886.17186.0357.03

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 8 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_hst_stats
    • widget_hst_support
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hitsteps-visitor-manager/init.woocommerce.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hitsteps-visitor-manager/init.ninjaform.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hitsteps-visitor-manager/init.jetpack.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/hitsteps-visitor-manager/init.gravityform.php:321
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/hitsteps-visitor-manager/hitsteps.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=hitsteps-visitor-manager/hitsteps.php
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 38 tag instead of maximum 10
Please take inspiration from this readme.txt

hitsteps-visitor-manager/hitsteps.php 92% from 13 tests

"Hitsteps Web Analytics" version 5.87's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("hitsteps-visitor-manager.php" instead of "hitsteps.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin4,733 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File81,2701,3673,071
PHP71,5399991,662

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity32.67
▷ Minimum class complexity6.00
▷ Maximum class complexity112.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods48
▷ Static methods2450.00%
▷ Public methods4593.75%
▷ Protected methods00.00%
▷ Private methods36.25%
Functions48
▷ Named functions4695.83%
▷ Anonymous functions24.17%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
favicon.png1.83KB1.51KB▼ 17.72%
logo.png11.55KB6.22KB▼ 46.20%
favicon_trans.png5.61KB2.98KB▼ 46.87%