94% wppm-google-analytics

Code Review | Google Analytics Wordpress Plugin

WordPress plugin Google Analytics Wordpress Plugin scored 94% from 54 tests.

About plugin

  • Plugin page: wppm-google-analy...
  • Plugin version: 3.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 5.9.2
  • First release: Jan 6, 2018
  • Latest release: Jul 31, 2021
  • Number of updates: 12
  • Update frequency: every 108.6 days
  • Top authors: pradeepku041 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active / 7,510 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼317.48ms] Passed 4 tests

Analyzing server-side resources used by Google Analytics Wordpress Plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0257.56 ▲5.08
Dashboard /wp-admin3.43 ▲0.0135.63 ▼0.76
Posts /wp-admin/edit.php3.66 ▲0.0237.56 ▼39.62
Add New Post /wp-admin/post-new.php6.90 ▼0.0894.79 ▼1,226.63
Media Library /wp-admin/upload.php3.31 ▲0.0123.76 ▼2.89

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Google Analytics Wordpress Plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲3616.46 ▲0.7912.77 ▲5.982.54 ▲0.08
Dashboard /wp-admin2,912 ▲526.06 ▼0.07118.41 ▼12.82174.60 ▲6.55
Posts /wp-admin/edit.php2,708 ▲173.36 ▲0.1273.57 ▲9.64206.56 ▲55.68
Add New Post /wp-admin/post-new.php1,674 ▲1315.38 ▼0.85431.58 ▲6.72156.04 ▼29.73
Media Library /wp-admin/upload.php1,715 ▲175.51 ▼0.09184.32 ▲45.54188.60 ▼1.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wppm-google-analytics/google-analytics-code.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
9 plugin tags: google analytic wordpress plugin, insert google analytic in all pages, analytic wordpress plugin, google analytic in footer, google analytic in header...

wppm-google-analytics/setting-analytics.php 85% from 13 tests

The main file in "Google Analytics Wordpress Plugin" v. 3.2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 196 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("wppm-google-analytics.php" instead of "setting-analytics.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected79 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3482079

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 were not PNG files found in your plugin