74% lcmd-tracking-codes

Code Review | LC Tracking Codes

WordPress plugin LC Tracking Codes scored 74% from 54 tests.

About plugin

  • Plugin page: lcmd-tracking-codes
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Dec 12, 2018
  • Latest release: Sep 9, 2019
  • Number of updates: 44
  • Update frequency: every 6.2 days
  • Top authors: lcloss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 869 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.52MB] [CPU: ▼18.70ms] Passed 4 tests

An overview of server-side resources used by LC Tracking Codes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1546.33 ▲2.65
Dashboard /wp-admin3.46 ▲0.1552.51 ▼2.14
Posts /wp-admin/edit.php3.57 ▲0.2255.17 ▼9.24
Add New Post /wp-admin/post-new.php3.34 ▼2.5541.45 ▼59.91
Media Library /wp-admin/upload.php3.38 ▲0.1536.90 ▼3.52

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

LC Tracking Codes: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲3413.19 ▼0.072.24 ▲0.0838.94 ▼7.05
Dashboard /wp-admin2,221 ▲154.82 ▼0.02105.43 ▼0.4340.14 ▼2.68
Posts /wp-admin/edit.php2,104 ▲122.04 ▼0.0035.29 ▼7.6433.13 ▼4.43
Add New Post /wp-admin/post-new.php1,547 ▲2223.32 ▲0.14645.75 ▼46.3762.30 ▲5.71
Media Library /wp-admin/upload.php1,400 ▲154.35 ▲0.1996.92 ▼12.4342.02 ▼2.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function LCMD\\__() in wp-content/plugins/lcmd-tracking-codes/lcmd-tracking-codes.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: google search console, google webmasters, tracking codes, google analytics, bing...

lcmd-tracking-codes/lcmd-tracking-codes.php 85% from 13 tests

"LC Tracking Codes" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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 ("lcmd-tracking-codes")
  • Domain Path: Prefix the domain path with a forward slash character ("/lcmd-tracking-codes")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Almost there! Just fix the following issues
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/lcmd-tracking-codes/deploy.bat
5,130 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON2003,724
PHP4147187908
PO File2102140362
Markdown318092
CSS11023
JavaScript11014
DOS Batch1007

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity49.00
▷ Minimum class complexity33.00
▷ Maximum class complexity65.00
Average method complexity3.23
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods44
▷ Static methods49.09%
▷ Public methods3681.82%
▷ Protected methods00.00%
▷ Private methods818.18%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.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
No PNG files were detected