84% tiny-gtag-js-analytics

Code Review | Tiny gtag.js Analytics

WordPress plugin Tiny gtag.js Analytics scored84%from 54 tests.

About plugin

  • Plugin page: tiny-gtag-js-anal...
  • Plugin version: 3.0.1
  • PHP compatiblity: 5.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 22, 2018
  • Latest release: May 9, 2023
  • Number of updates: 14
  • Update frequency: every 116.4 days
  • Top authors: lev0 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼0.67ms] Passed 4 tests

This is a short check of server-side resources used by Tiny gtag.js Analytics
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0543.82 ▼0.25
Dashboard /wp-admin3.38 ▲0.0854.31 ▼0.15
Posts /wp-admin/edit.php3.43 ▲0.0749.86 ▲3.69
Add New Post /wp-admin/post-new.php5.96 ▲0.0792.76 ▼2.42
Media Library /wp-admin/upload.php3.30 ▲0.0736.30 ▲0.16
gtag.js /wp-admin/options-general.php?page=tiny-gtag-js-analytics-admin3.2732.00

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Tiny gtag.js Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.20 ▼1.155.49 ▲3.4648.46 ▲6.73
Dashboard /wp-admin2,210 ▲194.84 ▼0.03108.88 ▲2.9541.97 ▲0.32
Posts /wp-admin/edit.php2,093 ▲72.05 ▼0.1340.66 ▲2.9837.52 ▲3.16
Add New Post /wp-admin/post-new.php1,545 ▲1218.19 ▼5.09644.37 ▼46.4950.48 ▼13.36
Media Library /wp-admin/upload.php1,386 ▼24.31 ▲0.11100.85 ▼0.5641.03 ▼3.43
gtag.js /wp-admin/options-general.php?page=tiny-gtag-js-analytics-admin8682.0322.3131.79

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tiny-gtag-js-analytics/tiny-gtag-js-analytics.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
2 plugin tags: google, analytics

tiny-gtag-js-analytics/tiny-gtag-js-analytics.php Passed 13 tests

Analyzing the main PHP file in "Tiny gtag.js Analytics" version 3.0.1
58 characters long description:
Simple, customisable gtag.js for Analytics and/or AdWords.

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
Good job! No executable or dangerous file extensions detected329 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21535329

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions00.00%
▷ Anonymous functions15100.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin