72% google-analyticator

Code Review | Analyticator

WordPress plugin Analyticator scored 72% from 54 tests.

About plugin

Code review

54 tests

User reviews

126 reviews

Install metrics

80,000+ active / 5,304,157 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.29MB] [CPU: ▲2.26ms] Passed 4 tests

Server-side resources used by Analyticator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.76 ▲0.3048.89 ▲6.48
Dashboard /wp-admin3.59 ▲0.2952.87 ▲3.10
Posts /wp-admin/edit.php3.71 ▲0.3550.27 ▲3.18
Add New Post /wp-admin/post-new.php6.18 ▲0.2991.42 ▼0.37
Media Library /wp-admin/upload.php3.52 ▲0.2939.26 ▲3.11
AppSumo /wp-admin/admin.php?page=google_analyticator_go_appsumo_pro3.3127.70
Reset /wp-admin/admin.php?page=ga_reset3.3230.11
Other Tools /wp-admin/admin.php?page=google-analyticator-plugin-other-tools3.4832.83
Google Analytics /wp-admin/admin.php?page=google-analyticator3.3343.24
Google Analytics /wp-admin/admin.php?page=ga_activate3.4836.16

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 124 new files
Database: no new tables, 31 new options
New WordPress options
db_upgraded
ga_downloads_prefix
ga_enhanced_link_attr
ga_analyticator_global_notification
widget_recent-comments
ga_downloads
ga_extra_after
ga_analytic_snippet
widget_recent-posts
ga_outbound
...

Browser metrics Passed 4 tests

A check of browser resources used by Analyticator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.24 ▼1.122.42 ▼0.0635.48 ▼16.25
Dashboard /wp-admin2,244 ▲594.97 ▲0.09113.31 ▼25.1346.65 ▼8.80
Posts /wp-admin/edit.php2,124 ▲352.01 ▼0.0435.25 ▼6.0535.16 ▲0.39
Add New Post /wp-admin/post-new.php1,559 ▲3923.21 ▲0.17639.27 ▼49.8652.36 ▲1.08
Media Library /wp-admin/upload.php1,423 ▲384.19 ▲0.0297.45 ▼1.8347.04 ▲4.99
AppSumo /wp-admin/admin.php?page=google_analyticator_go_appsumo_pro2,21915.29603.31170.17
Reset /wp-admin/admin.php?page=ga_reset280.440.063.50
Other Tools /wp-admin/admin.php?page=google-analyticator-plugin-other-tools1,0042.0526.9551.27
Google Analytics /wp-admin/admin.php?page=google-analyticator8672.0230.0747.25
Google Analytics /wp-admin/admin.php?page=ga_activate8632.0527.7133.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 30 options
    • ga_defaults
    • ga_admin_disable_DimentionIndex
    • ga_downloads
    • ga_google_token
    • widget_recent-posts
    • ga_analytic_snippet
    • ga_admin_status
    • ga_disable_gasites
    • ga_enhanced_link_attr
    • ga_uid
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/google-analyticator/appsumo-capture-form.php
  • 69× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_SiteVerificationService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_GanService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_ReportsService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_CustomsearchService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_ModeratorService.php:25
    • > PHP Fatal error
      require_once(): Failed opening required 'GA_API_Pathservice/Google_Utils.php' (include_path='.:/usr/share/php') in wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_LatitudeService.php:25
    • > PHP Warning
      Use of undefined constant GA_API_Path - assumed 'GA_API_Path' (this will throw an Error in a future version of PHP) in wp-content/plugins/google-analyticator/google-api-php-client/src/auth/Google_OAuth2.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_ResellerService.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Google_ServiceResource' not found in wp-content/plugins/google-analyticator/google-api-php-client/src/contrib/Google_AndroidpublisherService.php:25

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=google_analyticator_go_appsumo_pro
    • > Network (severe)
    https://appsumo.com/tools/wordpress/?utm_source=sumo&utm_medium=wp-widget&utm_campaign=google-analyticator - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=google_analyticator_go_appsumo_pro
    • > Javascript (severe) in unknown
    https://appsumo2-cdn.appsumo.com/static/dist/js/vue_bridge.61ea1a9c.js 6:75186 Uncaught TypeError: (void 0) is not a function
    • > GET request to /wp-admin/admin.php?page=google_analyticator_go_appsumo_pro
    • > Console-api (warning) in unknown
    https://accounts.google.com/gsi/client 40:457 "[GSI_LOGGER]: Relative login_uri was provided. Use absolute url instead. Relative login_uri may be considered invalid in the future."
    • > GET request to /wp-admin/admin.php?page=ga_reset
    • > Network (severe)
    wp-admin/admin.php?page=ga_reset - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (An example of the admin dashboard widget displaying stats pulled from Google Analytics.), #2 (The top half of the settings page.), #3 (The configuration options for the front-end widget.), #4 (An example of a front-end widget configuration.), #5 (An example of a front-end widget configuration.), #6 (An example of a front-end widget configuration.)
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

google-analyticator/google-analyticator.php 92% from 13 tests

"Analyticator" version 6.5.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)

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
Everything looks great! No dangerous files found in this plugin54,002 lines of code in 98 files:
LanguageFilesBlank linesComment linesLines of code
PHP842,65812,70352,007
PO File44226501,420
CSS2342329
JavaScript5912142
SVG302104

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1,315
▷ Abstract classes50.38%
▷ Concrete classes1,31099.62%
▷ Final classes00.00%
Methods10,996
▷ Static methods180.16%
▷ Public methods10,96099.67%
▷ Protected methods90.08%
▷ Private methods270.25%
Functions30
▷ Named functions30100.00%
▷ Anonymous functions00.00%
Constants64
▷ Global constants4976.56%
▷ Class constants1523.44%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
16 PNG files occupy 0.46MB with 0.22MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
wlcms-plugin-advert.png28.79KB26.59KB▼ 7.64%
screenshot-2.png94.36KB35.80KB▼ 62.06%
screenshot-6.png5.46KB2.85KB▼ 47.87%
ga-plugin-advert-sidebar.png75.89KB24.89KB▼ 67.20%
screenshot-4.png6.30KB3.21KB▼ 49.02%