83% analytify-analytics-dashboard-widget

Code Review | Google Analytics Dashboard Widget by Analytify

WordPress plugin Google Analytics Dashboard Widget by Analytify scored83%from 54 tests.

About plugin

  • Plugin page: analytify-analyti...
  • Plugin version: 5.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 5, 2016
  • Latest release: Aug 10, 2023
  • Number of updates: 52
  • Update frequency: every 47.5 days
  • Top authors: hiddenpearls (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10,000+ active /380,806 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Google Analytics Dashboard Widget by Analytify
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.25 ▼2.53
Dashboard /wp-admin3.36 ▲0.0649.41 ▲0.40
Posts /wp-admin/edit.php3.41 ▲0.0545.10 ▲2.93
Add New Post /wp-admin/post-new.php5.94 ▲0.0583.80 ▼0.69
Media Library /wp-admin/upload.php3.28 ▲0.0536.94 ▲4.91

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Google Analytics Dashboard Widget by Analytify
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲16613.73 ▼0.684.70 ▲2.6244.79 ▲2.14
Dashboard /wp-admin2,295 ▲1034.92 ▼0.96111.43 ▼12.3675.97 ▲34.22
Posts /wp-admin/edit.php2,136 ▲441.98 ▼0.0635.68 ▼0.8234.19 ▼0.80
Add New Post /wp-admin/post-new.php1,716 ▲19722.44 ▼0.72680.57 ▲22.1851.53 ▼6.15
Media Library /wp-admin/upload.php1,433 ▲514.19 ▼0.03107.93 ▲12.0165.07 ▲24.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_option() on null in wp-content/plugins/analytify-analytics-dashboard-widget/classes/analytify-widget-addon.php:114
    • > PHP Notice
      Trying to get property 'settings' of non-object in wp-content/plugins/analytify-analytics-dashboard-widget/classes/analytify-widget-addon.php on line 114
    • > PHP Notice
      Undefined index: WP_ANALYTIFY in wp-content/plugins/analytify-analytics-dashboard-widget/classes/analytify-widget-addon.php on line 86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

analytify-analytics-dashboard-widget/wp-analytify-dashboard.php 85% from 13 tests

"Google Analytics Dashboard Widget by Analytify" version 5.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 144 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("analytify-analytics-dashboard-widget.php" instead of "wp-analytify-dashboard.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin1,886 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP6253378907
PO File5200292413
CSS16016337
JavaScript24327181
SVG10148

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity35.00
▷ Minimum class complexity16.00
▷ Maximum class complexity72.00
Average method complexity4.29
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods412.90%
▷ Public methods1135.48%
▷ Protected methods00.00%
▷ Private methods2064.52%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/analytify-logo-135x24.png3.11KB2.23KB▼ 28.21%
assets/images/waves.png32.83KB10.56KB▼ 67.84%