10% googlyzer

Code Review | Googlyzer

WordPress plugin Googlyzer scored10%from 54 tests.

About plugin

  • Plugin page: googlyzer
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.3.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2011
  • Latest release: Mar 16, 2012
  • Number of updates: 30
  • Update frequency: every 6.4 days
  • Top authors: wmsedgar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /8,479 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/googlyzer/inc/DataFeed.php+191
    Declaration of googlyzer_DataFeed::buildPostRequest($args) should be compatible with googlyzer_GoogleFeed::buildPostRequest($args = Array)

Server metrics [RAM: ▼1.78MB] [CPU: ▼56.13ms] Passed 4 tests

Analyzing server-side resources used by Googlyzer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.62 ▼35.85
Dashboard /wp-admin2.23 ▼1.076.94 ▼49.38
Posts /wp-admin/edit.php2.23 ▼1.128.64 ▼48.12
Add New Post /wp-admin/post-new.php2.23 ▼3.667.39 ▼91.15
Media Library /wp-admin/upload.php2.23 ▼1.007.24 ▼29.83
Googlyzer Dashboard /wp-admin/index.php?page=googlyzer-dashboard2.237.72
Googlyzer /wp-admin/options-general.php?page=googlyzer2.237.35

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 92 new files
Database: no new tables, 12 new options
New WordPress options
googlyzer-options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
googlyzer-linecharts
googlyzer-tables
googlyzer-piecharts
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for Googlyzer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲20913.60 ▼0.6810.75 ▲9.0641.61 ▲2.40
Dashboard /wp-admin2,271 ▲945.76 ▲0.1692.19 ▼2.9344.24 ▼0.28
Posts /wp-admin/edit.php2,116 ▲162.17 ▲0.1436.74 ▼1.2329.76 ▼7.59
Add New Post /wp-admin/post-new.php1,537 ▲1023.03 ▼0.11678.32 ▲52.8857.07 ▲9.24
Media Library /wp-admin/upload.php1,416 ▲194.33 ▲0.17114.03 ▲4.7847.71 ▲0.10
Googlyzer Dashboard /wp-admin/index.php?page=googlyzer-dashboard8142.0127.6323.13
Googlyzer /wp-admin/options-general.php?page=googlyzer1,3202.0931.4128.96

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/googlyzer/inc/DataFeed.php+191
    Declaration of googlyzer_DataFeed::buildPostRequest($args) should be compatible with googlyzer_GoogleFeed::buildPostRequest($args = Array)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Warning in wp-content/plugins/googlyzer/inc/DataFeed.php+191
    Declaration of googlyzer_DataFeed::buildPostRequest($args) should be compatible with googlyzer_GoogleFeed::buildPostRequest($args = Array)
  • 88 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Notice in wp-content/plugins/googlyzer/inc/Options.php+782
    Array to string conversion
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Deprecated in wp-content/plugins/googlyzer/inc/Options.php+1287
    Non-static method googlyzer_Utilities::getSelections() should not be called statically
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Deprecated in wp-content/plugins/googlyzer/inc/Utilities.php+646
    Non-static method googlyzer_Utilities::isAssociative() should not be called statically
  • 40 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Deprecated in wp-content/plugins/googlyzer/inc/Options.php+1397
    Non-static method googlyzer_Utilities::validCheckbox() should not be called statically
  • 46 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Deprecated in wp-content/plugins/googlyzer/inc/Options.php+1484
    Non-static method googlyzer_Utilities::validHexColor() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Deprecated in wp-content/plugins/googlyzer/inc/Options.php+1380
    Non-static method googlyzer_Utilities::validGoogleAnalyticsTableId() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Notice in wp-content/plugins/googlyzer/inc/Options.php+782
    Undefined property: googlyzer_options::$Array
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Notice in wp-content/plugins/googlyzer/inc/Options.php+782
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/index.php?page=googlyzer-dashboard
    • > Deprecated in wp-content/plugins/googlyzer/inc/Dashboard.php+484
    Non-static method googlyzer_Utilities::getOptions() should not be called statically
    • > GET request to /wp-admin/index.php?page=googlyzer-dashboard
    • > Deprecated in wp-content/plugins/googlyzer/inc/Dashboard.php+486
    Non-static method googlyzer_Utilities::validateSetup() should not be called statically
    • > GET request to /wp-admin/index.php?page=googlyzer-dashboard
    • > Deprecated in wp-content/plugins/googlyzer/inc/Utilities.php+1087
    Non-static method googlyzer_Utilities::isAuthorized() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Deprecated in wp-content/plugins/googlyzer/inc/AdminPage.php+444
    Non-static method googlyzer_Utilities::getFilteredHtml() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Warning in wp-content/plugins/googlyzer/inc/AdminPage.php+169
    ob_start(): non-static method googlyzer_Utilities::bufferFilter() should not be called statically

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
Please take a closer look at the following
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function network_site_url() in wp-content/plugins/googlyzer/googlyzer.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'googlyzer_GoogleFeed' not found in wp-content/plugins/googlyzer/inc/ClientLogin.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'googlyzer_GoogleFeed' not found in wp-content/plugins/googlyzer/inc/DataFeed.php:45
    • > PHP Fatal error
      Uncaught Error: Class 'googlyzer_GoogleFeed' not found in wp-content/plugins/googlyzer/inc/AccountFeed.php:45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/googlyzer/uninstall.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Javascript (severe) in unknown
    /wp-content/plugins/googlyzer/js/jquery.sparkline.js?ver=2.2 1041:18 Uncaught TypeError: Cannot read properties of undefined (reading 'msie')
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Network (severe)
    wp-admin/[INSERT_CAPTCHA_IMG_SRC] - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'value')" "TypeError: Cannot read properties of undefined (reading 'value')\n at googlyzer_CheckFields (/wp-content/plugins/googlyzer/js/googlyzer.options.js?ver=6.3.1:170:63)\n at HTMLDocument.\u003Canonymous> (/wp-admin/options-general.php?page=googlyzer:300:8)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=googlyzer
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'value')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (Main Googlyzer dashboard with sample data (Googlyzer Basic + Pro).), #2 (Googlyzer widget for the WordPress Home Dashboard with sample data (Googlyzer Basic + Pro).), #3 (GA tracking code configuration options (Googlyzer Basic + Pro).), #4 (Sparkline Chart sidebar multi-widget with sample data (Googlyzer Pro).), #5 (Sparkline Chart sidebar multi-widget options (Googlyzer Pro).), #6 (Most Popular Content sidebar multi-widget with sample data (Googlyzer Pro).), #7 (Most Popular Content sidebar multi-widget options (Googlyzer Pro).), #8 (Google Service Authentication section on General Settings tab.), #9 (Custom date selection on General Settings tab.), #10 (Color selection on Composite Chart tab.), #11 (Line Chart settings.), #12 (Pie Chart settings.), #13 (Table settings.), #14 (About and instructions.)
The official readme.txt might help

googlyzer/googlyzer.php 85% from 13 tests

The main PHP file in "Googlyzer" ver. 2.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Description: Keep the plugin description shorter than 140 characters (currently 395 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
No dangerous file extensions were detected8,481 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
PHP154812,1554,476
JavaScript42585722,118
CSS17783721,029
HTML19615858

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.12
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.87
▷ Minimum method complexity1.00
▷ Maximum method complexity79.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes17
▷ Abstract classes211.76%
▷ Concrete classes1588.24%
▷ Final classes00.00%
Methods220
▷ Static methods00.00%
▷ Public methods15570.45%
▷ Protected methods20.91%
▷ Private methods6328.64%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants46
▷ Global constants46100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
30 PNG files occupy 0.89MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
themes/smoothness/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
js/jscolor/hv.png2.80KB7.32KB0.00%
themes/smoothness/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
screenshot-8.png13.95KB6.39KB▼ 54.17%
screenshot-6.png27.82KB14.22KB▼ 48.89%