83% tracking-code-manager

Code Review | Tracking Code Manager

WordPress plugin Tracking Code Manager scored83%from 54 tests.

About plugin

  • Plugin page: tracking-code-man...
  • Plugin version: 2.0.16
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 7, 2015
  • Latest release: May 22, 2023
  • Number of updates: 121
  • Update frequency: every 24.5 days
  • Top authors: IntellyWP (83.47%)data443 (17.36%)

Code review

54 tests

User reviews

58 reviews

Install metrics

100,000+ active /2,054,222 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
Install script ran successfully

Server metrics [RAM: ▲1.15MB] [CPU: ▲14.73ms] Passed 4 tests

A check of server-side resources used by Tracking Code Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.63 ▲1.1764.35 ▲27.20
Dashboard /wp-admin4.45 ▲1.15100.64 ▲58.06
Posts /wp-admin/edit.php4.49 ▲1.1353.00 ▲7.89
Add New Post /wp-admin/post-new.php7.06 ▲1.17104.03 ▲10.22
Media Library /wp-admin/upload.php4.36 ▲1.1345.96 ▲13.62

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 568 new files
Database: no new tables, 12 new options
New WordPress options
db_upgraded
TCM_ShowWhatsNewSeenVersion
widget_recent-posts
TCM_PluginInstallDate[tracking-code-manager]
TCM_PluginUpdateDate[tracking-code-manager]
TCM_ShowActivationNotice
theysaidso_admin_options
TCM_PluginFirstInstall
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for Tracking Code Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.31 ▼0.981.83 ▼0.0142.50 ▼0.73
Dashboard /wp-admin2,213 ▲255.85 ▼0.06101.28 ▼13.3443.75 ▼2.44
Posts /wp-admin/edit.php2,090 ▲12.02 ▼0.0234.76 ▼0.5732.13 ▼0.09
Add New Post /wp-admin/post-new.php6,331 ▲4,81719.24 ▲1.73834.06 ▲196.7560.75 ▲10.56
Media Library /wp-admin/upload.php1,386 ▼54.24 ▼0.0194.48 ▼4.6641.97 ▼2.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 12 options
    • TCM_PluginInstallDate[tracking-code-manager]
    • widget_recent-comments
    • TCM_ShowWhatsNewSeenVersion
    • theysaidso_admin_options
    • db_upgraded
    • TCM_ShowWhatsNew
    • TCM_ShowActivationNotice
    • TCM_PluginUpdateDate[tracking-code-manager]
    • widget_theysaidso_widget
    • TCM_PluginFirstInstall
    • ...

Smoke tests 75% from 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 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 take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tracking-code-manager/index.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/tracking-code-manager/includes/core.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tracking-code-manager/includes/admin/metabox.php:74
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tracking-code-manager/includes/install.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/tracking-code-manager/includes/uninstall.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (39 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: These screenshots do not have images: #1 (New tracking code scripts), #2 (Include tracking code in specific page), #3 (Choose easily by typing the page title), #4 (Include also [All] posts or pages without selecting all one-by-one), #5 (List your tracking codes defined), #6 (Tracking code manager is also as a metabox in your posts/pages (you can remove by settings))
You can take inspiration from this readme.txt

tracking-code-manager/index.php 77% from 13 tests

"Tracking Code Manager" version 2.0.16's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 169 characters long)
  • Requires at least: Required version does not match the one declared in readme.txt ("2.7" instead of "3.6.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("tracking-code-manager.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin18,707 lines of code in 543 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5071,8674638,979
PHP296638416,442
SVG1002,671
CSS6656615

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity67.25
▷ Minimum class complexity1.00
▷ Maximum class complexity472.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods397
▷ Static methods92.27%
▷ Public methods35890.18%
▷ Protected methods30.76%
▷ Private methods369.07%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants86
▷ Global constants7081.40%
▷ Class constants1618.60%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
16 PNG files occupy 0.65MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png35.08KB18.86KB▼ 46.24%
screenshot-3.png25.16KB15.49KB▼ 38.46%
assets/images/heart.png0.60KB0.50KB▼ 16.72%
assets/landing/mockup.png149.86KB39.76KB▼ 73.47%
screenshot-1.png65.47KB34.06KB▼ 47.98%