89% counter-visitor-for-woocommerce

Code Review | Counter live visitors for WooComerce

WordPress plugin Counter live visitors for WooComerce scored89%from 54 tests.

About plugin

  • Plugin page: counter-visitor-f...
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.0
  • WordPress version: 6.3.1
  • First release: Sep 25, 2019
  • Latest release: Aug 10, 2023
  • Number of updates: 43
  • Update frequency: every 32.9 days
  • Top authors: taxarpro (88.37%)DanielRiera (13.95%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active /20,923 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.47ms] Passed 4 tests

An overview of server-side resources used by Counter live visitors for WooComerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0726.87 ▼14.91
Dashboard /wp-admin3.40 ▲0.0944.88 ▼2.50
Posts /wp-admin/edit.php3.51 ▲0.1546.31 ▲1.97
Add New Post /wp-admin/post-new.php5.98 ▲0.0991.56 ▲1.55
Media Library /wp-admin/upload.php3.32 ▲0.0936.86 ▲3.82
Visitor Counter /wp-admin/admin.php?page=wcvisitor-options3.3934.77

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
_WCVisitor_folder_name
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Counter live visitors for WooComerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,487 ▼28413.27 ▲0.030.46 ▼4.3917.09 ▼31.26
Dashboard /wp-admin2,228 ▲404.81 ▼0.05111.50 ▲7.0244.06 ▲1.44
Posts /wp-admin/edit.php2,110 ▲212.05 ▲0.0240.96 ▲1.3136.53 ▲2.68
Add New Post /wp-admin/post-new.php1,555 ▲3323.39 ▲0.03679.03 ▲29.3958.71 ▼0.09
Media Library /wp-admin/upload.php1,410 ▲224.24 ▲0.0699.47 ▼9.2346.49 ▼1.35
Visitor Counter /wp-admin/admin.php?page=wcvisitor-options1,1272.0224.6833.66

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • _WCVisitor_folder_name
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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 SRP test was a success

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: realtime, counter, visitor counter, counter visitor, users counter...

counter-visitor-for-woocommerce/woo-counter-visitor.php 85% from 13 tests

"Counter live visitors for WooComerce" version 1.3.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.3" instead of "3.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("counter-visitor-for-woocommerce.php" instead of "woo-counter-visitor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected10,237 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
PHP38641615
PO File16068174
Markdown144082
JavaScript18047
CSS21420

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity28.00
▷ Minimum class complexity2.00
▷ Maximum class complexity54.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2275.86%
▷ Protected methods00.00%
▷ Private methods724.14%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wordpress-org/banner-772x250.png26.57KB10.71KB▼ 59.68%
wordpress-org/banner-1544x500.png69.30KB27.82KB▼ 59.85%
wordpress-org/icon-128x128.png1.71KB0.67KB▼ 60.95%
wordpress-org/banner-1880x609.png46.95KB21.54KB▼ 54.13%