84% easy-ga-google-analytics

Code Review | Easy GA Google Analytics

WordPress plugin Easy GA Google Analytics scored84%from 54 tests.

About plugin

  • Plugin page: easy-ga-google-an...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.5
  • WordPress version: 6.3.1
  • First release: Jul 5, 2016
  • Latest release: Nov 15, 2016
  • Number of updates: 10
  • Update frequency: every 13.5 days
  • Top authors: jasabalete (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,095 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.12ms] Passed 4 tests

Analyzing server-side resources used by Easy GA Google Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.13 ▼4.26
Dashboard /wp-admin3.31 ▲0.0152.10 ▼0.09
Posts /wp-admin/edit.php3.36 ▲0.0052.92 ▲6.07
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.13 ▲2.32
Media Library /wp-admin/upload.php3.23 ▲0.0038.39 ▲1.57
Easy Google Analytics /wp-admin/options-general.php?page=easy_ga_admin3.2333.38

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

A short overview of filesystem and database impact
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_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Easy GA Google Analytics: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.72 ▲0.431.75 ▼0.3048.49 ▲7.75
Dashboard /wp-admin2,199 ▲255.61 ▼0.0484.91 ▼1.3239.79 ▼7.48
Posts /wp-admin/edit.php2,107 ▲41.98 ▼0.0341.67 ▲4.7636.13 ▼2.84
Add New Post /wp-admin/post-new.php1,539 ▲1318.56 ▼4.31647.49 ▼40.4369.25 ▲12.37
Media Library /wp-admin/upload.php1,407 ▲74.16 ▼0.04105.93 ▲2.7545.16 ▼1.21
Easy Google Analytics /wp-admin/options-general.php?page=easy_ga_admin7902.0226.7425.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/easy-ga-google-analytics/admin/easy_ga_admin.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
4 plugin tags: google, analytics, google analytics, ga

easy-ga-google-analytics/easy-ga-google-analytics.php Passed 13 tests

Analyzing the main PHP file in "Easy GA Google Analytics" version 1.1.0
125 characters long description:
Copy&Paste your Google Analytics code snippet and enables google analytics on all pages. Only Anonymous users have analytics.

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 detected96 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2182959
PO File13323
Markdown19014

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png15.95KB6.84KB▼ 57.10%