90% datalayer-for-ecommerce-free

Code Review | Datalayer for WooCommerce FREE

WordPress plugin Datalayer for WooCommerce FREE scored90%from 54 tests.

About plugin

  • Plugin page: datalayer-for-eco...
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2022
  • Latest release: Nov 30, 2023
  • Number of updates: 18
  • Update frequency: every 28.9 days
  • Top authors: arraycodes (61.11%)arrayevida (44.44%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.32ms] Passed 4 tests

This is a short check of server-side resources used by Datalayer for WooCommerce FREE
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0536.36 ▼4.11
Dashboard /wp-admin3.33 ▲0.0247.56 ▼2.56
Posts /wp-admin/edit.php3.44 ▲0.0849.83 ▼0.56
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.03 ▼10.04
Media Library /wp-admin/upload.php3.25 ▲0.0234.52 ▲1.78

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Datalayer for WooCommerce FREE
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲314.72 ▼0.041.88 ▼0.0445.77 ▼1.04
Dashboard /wp-admin2,195 ▲185.62 ▼0.0589.56 ▼13.4637.08 ▼9.14
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0238.67 ▼6.7337.42 ▼1.42
Add New Post /wp-admin/post-new.php1,526 ▼323.23 ▲0.17600.26 ▼40.5849.20 ▼5.20
Media Library /wp-admin/upload.php1,397 ▼64.23 ▼0.0496.64 ▲0.4942.70 ▼0.60

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • migrate_datalayer_for_woocommerce
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: analytics, ua, ga4, gtm tag manager, universal analytics...

datalayer-for-ecommerce-free/datalayer-for-ecommerce-free.php Passed 13 tests

"Datalayer for WooCommerce FREE" version 3.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
136 characters long description:
DataLayer is an object that makes available in real time the information that is executed by users while browsing the WooCommerce Store.

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
No dangerous file extensions were detected1,606 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP233107801,535
PO File1218664
JSON1005
CSS1001
JavaScript1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes318.75%
Methods90
▷ Static methods3842.22%
▷ Public methods7987.78%
▷ Protected methods00.00%
▷ Private methods1112.22%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.01MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/logo-datalayer-for-ecommerce-free.png3.09KB3.22KB0.00%
assets/build/images/logo-datalayer-for-ecommerce-free.1a10e733.png3.09KB3.22KB0.00%