90% integrate-ga4-google-analytics

Code Review | Integrate GA4 Google Analytics

WordPress plugin Integrate GA4 Google Analytics scored90%from 54 tests.

About plugin

  • Plugin page: integrate-ga4-goo...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 19, 2023
  • Latest release: Jun 9, 2023
  • Number of updates: 8
  • Update frequency: every 6.4 days
  • Top authors: Obadiah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /771 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.31ms] Passed 4 tests

Analyzing server-side resources used by Integrate GA4 Google Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.45 ▲3.63
Dashboard /wp-admin3.33 ▼0.0152.84 ▼13.26
Posts /wp-admin/edit.php3.38 ▲0.0350.47 ▼4.86
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.24 ▼7.54
Media Library /wp-admin/upload.php3.26 ▲0.0341.35 ▲0.42
Integrate GA4 Google Analytics /wp-admin/options-general.php?page=integrate-ga-analytics3.2234.50

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Integrate GA4 Google Analytics
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5814.77 ▲0.021.89 ▼0.0846.18 ▲1.20
Dashboard /wp-admin2,213 ▲135.83 ▼0.05106.34 ▼8.7141.63 ▼2.86
Posts /wp-admin/edit.php2,104 ▲12.02 ▼0.0338.04 ▼0.2738.74 ▲5.23
Add New Post /wp-admin/post-new.php1,548 ▼123.16 ▼0.01609.09 ▼82.5869.09 ▼4.64
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.01101.69 ▼15.8346.70 ▲0.64
Integrate GA4 Google Analytics /wp-admin/options-general.php?page=integrate-ga-analytics8542.0229.1635.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: ga, google analytics plugin, integrate ga4 google analytics, obadiah, tracking...

integrate-ga4-google-analytics/integrate-ga4-google-analytics.php Passed 13 tests

The entry point to "Integrate GA4 Google Analytics" version 1.2 is a PHP file that has certain tags in its header comment area
104 characters long description:
A simple, lightweight plugin to easily integrate Google Analytics GA4 tracking into your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin110 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11624110

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin