83% quick-google-analytics

Code Review | Quick Google Analytics

WordPress plugin Quick Google Analytics scored83%from 54 tests.

About plugin

  • Plugin page: quick-google-anal...
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 28, 2018
  • Latest release: Oct 10, 2023
  • Number of updates: 20
  • Update frequency: every 90.4 days
  • Top authors: Annubis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /3,912 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.37ms] Passed 4 tests

Analyzing server-side resources used by Quick Google Analytics
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0343.76 ▲0.76
Dashboard /wp-admin3.34 ▲0.0355.81 ▼3.69
Posts /wp-admin/edit.php3.39 ▲0.0356.83 ▼1.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.02 ▼13.13
Media Library /wp-admin/upload.php3.26 ▲0.0340.50 ▲3.62
Quick Google Analytics /wp-admin/options-general.php?page=QGA_quickgoogleanalytics3.2340.19

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Quick Google Analytics
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6814.49 ▼0.079.63 ▲7.4044.86 ▲2.66
Dashboard /wp-admin2,198 ▲215.57 ▲0.0483.38 ▼13.2542.12 ▲1.91
Posts /wp-admin/edit.php2,106 ▲31.98 ▼0.0539.18 ▼3.5538.68 ▲2.17
Add New Post /wp-admin/post-new.php1,531 ▲523.19 ▼0.01597.26 ▼98.0452.53 ▼0.36
Media Library /wp-admin/upload.php1,409 ▲94.22 ▲0.03104.47 ▼0.0543.78 ▼1.90
Quick Google Analytics /wp-admin/options-general.php?page=QGA_quickgoogleanalytics9132.0427.2431.42

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-google-analytics/shortcode_ga_g.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-google-analytics/shortcode_ga_ua.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: statistik, universal analytics, analytics, tracking code, google analytics...

quick-google-analytics/quickgoogleanalytics.php 77% from 13 tests

"Quick Google Analytics" version 1.3.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("quick-google-analytics.php" instead of "quickgoogleanalytics.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("4.0.1" instead of "3.5")
  • Description: Please keep the plugin description shorter than 140 characters (currently 178 characters long)

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
There were no executable files found in this plugin268 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP613859262
CSS1106

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions11
▷ Named functions11100.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