74% tru-utm-generator

Code Review | UTM Generator

WordPress plugin UTM Generator scored74%from 54 tests.

About plugin

  • Plugin page: tru-utm-generator
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.2.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Aug 14, 2019
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: mndpsingh287 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /625 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.27ms] Passed 4 tests

Analyzing server-side resources used by UTM Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.05 ▼6.56
Dashboard /wp-admin3.36 ▲0.0652.62 ▼7.61
Posts /wp-admin/edit.php3.41 ▲0.0653.59 ▼0.83
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.22 ▼2.09
Media Library /wp-admin/upload.php3.28 ▲0.0640.05 ▲4.48
UTM Generator /wp-admin/admin.php?page=tru_utm_generator3.2937.54
Settings /wp-admin/admin.php?page=tru_utm_generator_settings3.2937.35
Email /wp-admin/admin.php?page=tru_utm_generator_email_settings3.2935.91

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 26 new files
Database: 1 new table, 6 new options
New tables
wp_tru_utm_generator
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for UTM Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲17213.98 ▼0.499.08 ▲7.2321.90 ▼19.44
Dashboard /wp-admin2,236 ▲625.11 ▼0.4993.69 ▲3.9348.06 ▲5.94
Posts /wp-admin/edit.php2,141 ▲412.37 ▲0.3540.21 ▲4.7239.66 ▲3.47
Add New Post /wp-admin/post-new.php1,564 ▲3823.59 ▲0.21665.62 ▼1.2663.53 ▲9.11
Media Library /wp-admin/upload.php1,441 ▲414.44 ▲0.29103.20 ▼6.0145.84 ▼2.66
UTM Generator /wp-admin/admin.php?page=tru_utm_generator1,1042.5545.6962.10
Settings /wp-admin/admin.php?page=tru_utm_generator_settings9401.8626.7948.49
Email /wp-admin/admin.php?page=tru_utm_generator_email_settings9571.8725.7537.16

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_tru_utm_generator
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tru-utm-generator/classes/tru_utm_generator.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/tru-utm-generator/tru-utm-generator.php:12

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 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed: You can look at the official readme.txt

tru-utm-generator/tru-utm-generator.php Passed 13 tests

"UTM Generator" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
18 characters long description:
Generate UTM links

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected2,802 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
CSS5123601,724
PHP64552510
SVG400291
JavaScript4612277

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png1.16KB0.40KB▼ 65.74%
images/search.png1.29KB0.52KB▼ 60.12%