78% connects-tracking

Code Review | Connects - Tracking for WooCommerce

WordPress plugin Connects - Tracking for WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: connects-tracking
  • Plugin version: 1.1.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.8
  • WordPress version: 6.3.1
  • First release: Nov 8, 2019
  • Latest release: Jul 21, 2021
  • Number of updates: 24
  • Update frequency: every 25.9 days
  • Top authors: connects (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /726 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 successfully, without throwing any errors or notices

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

A check of server-side resources used by Connects - Tracking for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.18 ▲1.36
Dashboard /wp-admin3.34 ▲0.0450.02 ▼2.33
Posts /wp-admin/edit.php3.39 ▲0.0344.56 ▲0.40
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.38 ▼17.09
Media Library /wp-admin/upload.php3.26 ▲0.0336.73 ▲1.82
Connects Tracking Settings /wp-admin/options-general.php?page=connects-tracking-settings3.2632.07

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Connects - Tracking for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲14513.55 ▼0.735.64 ▲3.7841.94 ▼0.82
Dashboard /wp-admin2,217 ▲295.88 ▲0.0298.85 ▼1.7441.92 ▼2.51
Posts /wp-admin/edit.php2,079 ▼102.00 ▼0.0034.72 ▼0.4735.26 ▼1.09
Add New Post /wp-admin/post-new.php1,521 ▼1317.61 ▼5.68631.64 ▼26.8454.15 ▼12.29
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.0495.35 ▼3.9840.83 ▼5.02
Connects Tracking Settings /wp-admin/options-general.php?page=connects-tracking-settings8572.0124.3542.86

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/connects-tracking/public/partials/connects-tracking-public-display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant CONNECTS_TRACKING_VERSION - assumed 'CONNECTS_TRACKING_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/connects-tracking/admin/partials/connects-tracking-admin-display.php on line 22
    • > PHP Warning
      Use of undefined constant LOGO_URL - assumed 'LOGO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/connects-tracking/admin/partials/connects-tracking-admin-display.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Connects_Tracking' not found in wp-content/plugins/connects-tracking/admin/partials/connects-tracking-admin-display.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Contributors: Contributors not specified
  • Contributors: The plugin tags were not defined
Please take inspiration from this readme.txt

connects-tracking/connects-tracking.php Passed 13 tests

Analyzing the main PHP file in "Connects - Tracking for WooCommerce" version 1.1.7
92 characters long description:
This Plugin can be used to integrate the Connects Conversion Tracking and the Profiling Tags

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin499 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12180587497
CSS1001
JavaScript1001

PHP code Passed 2 tests

A brief analysis 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.25
Average class complexity6.43
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.97
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods39
▷ Static methods512.82%
▷ Public methods3384.62%
▷ Protected methods00.00%
▷ Private methods615.38%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/img/connects_logo.png13.59KB5.45KB▼ 59.87%