78% wp-analytify

Code Review | Analytify - Google Analytics Dashboard For WordPress (GA4 analytics made easy)

WordPress plugin Analytify - Google Analytics Dashboard For WordPress (GA4 analytics made easy) scored78%from 54 tests.

About plugin

  • Plugin page: wp-analytify
  • Plugin version: 5.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.4
  • WordPress version: 6.3.1
  • First release: Jan 1, 2015
  • Latest release: Nov 17, 2023
  • Number of updates: 261
  • Update frequency: every 12.4 days
  • Top authors: hiddenpearls (56.32%)Asif2BD (44.06%)

Code review

54 tests

User reviews

460 reviews

Install metrics

40,000+ active /1,816,109 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
Installer ran successfully

Server metrics [RAM: ▲3.88MB] [CPU: ▲18.86ms] Passed 4 tests

An overview of server-side resources used by Analytify - Google Analytics Dashboard For WordPress (GA4 analytics made easy)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /7.31 ▲3.8558.14 ▲17.74
Dashboard /wp-admin7.20 ▲3.9071.61 ▲24.53
Posts /wp-admin/edit.php7.25 ▲3.8987.06 ▲37.64
Add New Post /wp-admin/post-new.php9.78 ▲3.90102.15 ▲6.86
Media Library /wp-admin/upload.php7.10 ▲3.8762.21 ▲26.29
Analytify Logs /wp-admin/admin.php?page=analytify-logs7.1860.84
PRO vs FREE /wp-admin/admin.php?page=analytify-go-pro7.1056.24
Dashboards /wp-admin/admin.php?page=analytify-dashboard6.8846.13
Settings /wp-admin/admin.php?page=analytify-settings6.9344.04
Activate /wp-admin/admin.php?page=analytify-optin7.2359.30
Add-ons /wp-admin/admin.php?page=analytify-addons6.8841.94
Analytify Promo /wp-admin/admin.php?page=analytify-promo7.1355.06

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2,202 new files
Database: no new tables, 19 new options
New WordPress options
wp-analytify-advanced
wp-analytify-dashboard
wp-analytify-admin
analytify_default_settings
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
wp_analytify_modules
db_upgraded
analytify_current_version
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Analytify - Google Analytics Dashboard For WordPress (GA4 analytics made easy)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,296 ▲53415.08 ▲0.695.51 ▲3.6837.42 ▼9.84
Dashboard /wp-admin2,553 ▲3796.51 ▲0.93121.92 ▲21.64120.14 ▲77.27
Posts /wp-admin/edit.php2,435 ▲3353.93 ▲1.9170.96 ▲34.5684.39 ▲47.79
Add New Post /wp-admin/post-new.php1,644 ▲11323.58 ▲0.74665.83 ▼18.93108.05 ▲54.70
Media Library /wp-admin/upload.php1,547 ▲1504.34 ▲0.2097.64 ▼5.0183.83 ▲40.49
Analytify Logs /wp-admin/admin.php?page=analytify-logs1,1183.0642.5067.74
PRO vs FREE /wp-admin/admin.php?page=analytify-go-pro1,2823.0545.0493.12
Dashboards /wp-admin/admin.php?page=analytify-dashboard1,5663.1245.75144.55
Settings /wp-admin/admin.php?page=analytify-settings1,5693.1249.57115.35
Activate /wp-admin/admin.php?page=analytify-optin1,5733.1339.26107.93
Add-ons /wp-admin/admin.php?page=analytify-addons1,5783.1244.46137.84
Analytify Promo /wp-admin/admin.php?page=analytify-promo1,2943.5946.6179.80
Help /wp-admin/admin.php?page=analytify-settings#wp-analytify-help1,5693.1344.40121.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 19 options
    • analytify_logs_setup
    • theysaidso_admin_options
    • WP_ANALYTIFY_PLUGIN_VERSION
    • wp-analytify-profile
    • analytify_default_settings
    • wp-analytify-advanced
    • widget_theysaidso_widget
    • wp_analytify_modules
    • wp-analytify-admin
    • analytify_free_upgrade_routine
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-analytify/inc/analytify-optin-form.php
  • 1287× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/apiclient-services/src/Analytics/Goal.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/common-protos/src/Rpc/Help.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/analytics-data/src/V1beta/PropertyQuota.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/common-protos/src/Api/MonitoredResourceDescriptor.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/apiclient-services/src/Analytics/ExperimentParentLink.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Analytify\\phpseclib3\\Crypt\\Common\\Formats\\Keys\\PKCS' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/PKCS1.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/apiclient-services/src/Analytics/RemarketingAudienceStateBasedAudienceDefinition.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Service\\Resource' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/apiclient-services/src/SearchConsole/Resource/UrlInspection.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Analytify\\Psr\\Cache\\CacheException' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/psr/cache/src/InvalidArgumentException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Model' not found in wp-content/plugins/wp-analytify/lib/Google-GA4/vendor/google/apiclient-services/src/Analytics/IncludeConditions.php:20

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: There are too many tags (18 tag instead of maximum 10)
The official readme.txt is a good inspiration

wp-analytify/wp-analytify.php Passed 13 tests

"Analytify - Google Analytics Dashboard For WordPress (GA4 analytics made easy)" version 5.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
109 characters long description:
Analytify brings a brand new and modern feeling of Google Analytics superbly integrated within the WordPress.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected272,925 lines of code in 2,050 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,92327,039147,699242,369
PO File84,1167,17811,664
Markdown492,08205,939
CSS74152275,849
JSON34003,610
JavaScript166614063,208
SVG605157
Protocol Buffers2143864
XML30151
Bourne Shell24014

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.98
▷ Minimum class complexity1.00
▷ Maximum class complexity670.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces198
Interfaces57
Traits28
Classes4,019
▷ Abstract classes2295.70%
▷ Concrete classes3,79094.30%
▷ Final classes661.74%
Methods29,130
▷ Static methods1,2974.45%
▷ Public methods27,91695.83%
▷ Protected methods4691.61%
▷ Private methods7452.56%
Functions287
▷ Named functions11138.68%
▷ Anonymous functions17661.32%
Constants1,253
▷ Global constants322.55%
▷ Class constants1,22197.45%
▷ Public constants1,18396.89%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
58 compressed PNG files occupy 0.55MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
assets/img/admin-end.png29.28KB29.85KB0.00%
assets/img/authenticate2.png7.72KB8.13KB0.00%
assets/img/blue.png25.85KB26.31KB0.00%
assets/img/aa.png13.27KB13.94KB0.00%