74% cookieless-analytics

Code Review | Cookieless Analytics - Self Hosted Analytics

WordPress plugin Cookieless Analytics - Self Hosted Analytics scored74%from 54 tests.

About plugin

  • Plugin page: cookieless-analytics
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Dec 31, 2022
  • Latest release: Jan 19, 2023
  • Number of updates: 8
  • Update frequency: every 2.5 days
  • Top authors: gwsharsha (62.5%)analyticsninja (37.5%)gowebsmarty (25%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,152 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼4.74ms] Passed 4 tests

This is a short check of server-side resources used by Cookieless Analytics - Self Hosted Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1237.04 ▼3.24
Dashboard /wp-admin3.43 ▲0.1248.79 ▼0.31
Posts /wp-admin/edit.php3.54 ▲0.1844.96 ▼3.26
Add New Post /wp-admin/post-new.php6.03 ▲0.1490.61 ▼10.79
Media Library /wp-admin/upload.php3.35 ▲0.1235.86 ▼1.67
Cookieless Analytics /wp-admin/index.php?page=cookieless-analytics3.3131.85

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 46 new files
Database: 1 new table, 6 new options
New tables
wp_ckls_analytics
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Cookieless Analytics - Self Hosted Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,118 ▲37223.46 ▲8.8331.59 ▲29.7242.08 ▼1.50
Dashboard /wp-admin2,503 ▲31711.11 ▲6.17254.07 ▲146.3561.52 ▲16.60
Posts /wp-admin/edit.php2,091 ▲23.92 ▲1.9152.03 ▲10.6835.37 ▼1.33
Add New Post /wp-admin/post-new.php1,369 ▼15117.79 ▼5.39552.64 ▼123.4427.95 ▼33.77
Media Library /wp-admin/upload.php1,418 ▲275.50 ▲1.40105.17 ▼5.8242.30 ▼5.26
Cookieless Analytics /wp-admin/index.php?page=cookieless-analytics1,1728.19272.2672.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_ckls_analytics
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > GET request to /wp-admin/index.php?page=cookieless-analytics
    • > Javascript (severe) in unknown
    /wp-content/plugins/cookieless-analytics/admin/app/dist/bundle.js?ver=1.0.0 1:158786 Uncaught Error: Minified React error #299; visit https://reactjs.o… for full errors and additional helpful warnings.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: ga4, statistics, metrics, analytics, statistic...

cookieless-analytics/cookieless-analytics.php 85% from 13 tests

The main file in "Cookieless Analytics - Self Hosted Analytics" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("/languages *")
  • 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 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,635 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP16194191725
JavaScript1418429608
JSX24919235
Sass15034
CSS28532
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.38
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods57
▷ Static methods610.53%
▷ Public methods5189.47%
▷ Protected methods00.00%
▷ Private methods610.53%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/app/assets/dash-logo-white.png8.83KB3.85KB▼ 56.41%