84% lh-utm-tracking

Code Review | LH UTM Tracking

WordPress plugin LH UTM Tracking scored84%from 54 tests.

About plugin

  • Plugin page: lh-utm-tracking
  • Plugin version: 1.00
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 27, 2017
  • Latest release: Oct 27, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /667 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.98ms] Passed 4 tests

Server-side resources used by LH UTM Tracking
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0137.63 ▼3.91
Dashboard /wp-admin3.31 ▲0.0046.06 ▼3.79
Posts /wp-admin/edit.php3.36 ▲0.0046.33 ▼0.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0092.98 ▲2.16
Media Library /wp-admin/upload.php3.23 ▲0.0033.02 ▲0.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for LH UTM Tracking
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.41 ▼0.961.73 ▼0.1941.85 ▼6.71
Dashboard /wp-admin2,209 ▲214.88 ▲0.0199.56 ▼2.8140.04 ▼1.41
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0739.61 ▼5.1435.79 ▼3.56
Add New Post /wp-admin/post-new.php1,514 ▼017.46 ▼0.25603.74 ▼89.8056.31 ▲0.54
Media Library /wp-admin/upload.php1,385 ▼34.22 ▼0.1799.88 ▼11.7342.72 ▼4.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-utm-tracking/lh-utm-tracking.php:123

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: leads, grabber, shortcodes, collect, utm

lh-utm-tracking/lh-utm-tracking.php Passed 13 tests

The principal PHP file in "LH UTM Tracking" v. 1.00 is loaded by WordPress automatically on each request
42 characters long description:
Do lead tracking properly via localstorage

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
Success! There were no dangerous files found in this plugin178 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript210125
PHP1651953

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods250.00%
▷ Protected methods00.00%
▷ Private methods250.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
PNG images were not found in this plugin