62% blog-stats-by-w3counter

Code Review | W3Counter Free Real-Time Web Stats

WordPress plugin W3Counter Free Real-Time Web Stats scored62%from 54 tests.

About plugin

  • Plugin page: blog-stats-by-w3c...
  • Plugin version: 4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.0.0
  • WordPress version: 6.3.1
  • First release: Apr 11, 2008
  • Latest release: Oct 31, 2018
  • Number of updates: 30
  • Update frequency: every 128.5 days
  • Top authors: dangrossman (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /76,453 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼1.70MB] [CPU: ▼54.48ms] Passed 4 tests

This is a short check of server-side resources used by W3Counter Free Real-Time Web Stats
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.169.51 ▼30.89
Dashboard /wp-admin2.32 ▼1.0212.93 ▼49.93
Posts /wp-admin/edit.php2.32 ▼1.0311.42 ▼38.81
Add New Post /wp-admin/post-new.php2.32 ▼3.5710.38 ▼98.29
Media Library /wp-admin/upload.php2.32 ▼0.919.20 ▼24.81
W3Counter Stats /wp-admin/index.php?page=w3counter-stats-display2.3212.27
W3Counter /wp-admin/options-general.php?page=w3counter-config2.3212.15

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

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

Browser metrics Passed 4 tests

Checking browser requirements for W3Counter Free Real-Time Web Stats
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9814.45 ▼0.222.20 ▲0.4737.38 ▼6.61
Dashboard /wp-admin2,223 ▲324.90 ▼0.03105.76 ▲2.0539.59 ▼4.19
Posts /wp-admin/edit.php2,103 ▲142.03 ▼0.0038.99 ▲2.9534.06 ▲0.82
Add New Post /wp-admin/post-new.php1,548 ▲623.16 ▲4.84636.99 ▲0.8149.38 ▼5.69
Media Library /wp-admin/upload.php1,402 ▲114.28 ▲0.1098.96 ▲0.9645.06 ▲3.17
W3Counter Stats /wp-admin/index.php?page=w3counter-stats-display7612.0425.9321.47
W3Counter /wp-admin/options-general.php?page=w3counter-config8102.0526.9527.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Widget_W3Counter is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_w3counter
    • theysaidso_admin_options
    • widget_recent-posts

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
Please fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=w3counter-config
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in WP_Widget_W3Counter is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=w3counter-config
    • > Notice in wp-content/plugins/blog-stats-by-w3counter/w3counter.php+162
    Undefined variable: w3counter_user
    • > GET request to /wp-admin/options-general.php?page=w3counter-config
    • > Notice in wp-content/plugins/blog-stats-by-w3counter/w3counter.php+183
    Undefined variable: manual

SRP 50% 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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blog-stats-by-w3counter/w3counter.php:18

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
    • > GET request to /wp-admin/index.php?page=w3counter-stats-display
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot set properties of null (setting 'onload')" "TypeError: Cannot set properties of null (setting 'onload')\n at resizew3IframeInit (/wp-admin/index.php?page=w3counter-stats-display:51:69)\n at HTMLDocument.\u003Canonymous> (/wp-admin/index.php?page=w3counter-stats-display:8:80)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/index.php?page=w3counter-stats-display
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot set properties of null (setting 'onload')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Web Stats by W3Counter) image missing
You can look at the official readme.txt

blog-stats-by-w3counter/w3counter.php 85% from 13 tests

The entry point to "W3Counter Free Real-Time Web Stats" version 4.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("blog-stats-by-w3counter.php" instead of "w3counter.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 347 characters long)

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 detected193 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14410193

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
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
1 compressed PNG file occupies 0.02MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png16.34KB15.21KB▼ 6.95%