10% super-simple-google-analytics

Code Review | Super Simple Google Analytics

WordPress plugin Super Simple Google Analytics scored10%from 54 tests.

About plugin

  • Plugin page: super-simple-goog...
  • Plugin version: 1.7.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.4
  • WordPress version: 6.3.1
  • First release: Dec 7, 2011
  • Latest release: Feb 9, 2018
  • Number of updates: 97
  • Update frequency: every 23.3 days
  • Top authors: bitacre (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

5,000+ active /118,917 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/super-simple-google-analytics/SuperSimpleGoogleAnalytics.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; superSimpleGoogleAnalytics has a deprecated constructor

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.95ms] Passed 4 tests

This is a short check of server-side resources used by Super Simple Google Analytics
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.50 ▲0.80
Dashboard /wp-admin3.32 ▲0.0252.85 ▲1.76
Posts /wp-admin/edit.php3.37 ▲0.0153.18 ▼0.75
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.18 ▼17.59
Media Library /wp-admin/upload.php3.24 ▲0.0140.07 ▲4.87
Google Analytics /wp-admin/options-general.php?page=super_simple_google_analytics3.2132.97

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Super Simple Google Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5913.25 ▼1.001.63 ▼0.0544.63 ▲1.15
Dashboard /wp-admin2,210 ▲194.87 ▲0.01108.23 ▲4.1042.24 ▼3.90
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0341.96 ▲1.7436.19 ▼0.12
Add New Post /wp-admin/post-new.php1,538 ▲523.44 ▲0.22669.53 ▼27.2261.03 ▼6.48
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.04100.72 ▼5.5252.82 ▲7.35
Google Analytics /wp-admin/options-general.php?page=super_simple_google_analytics8702.0425.7929.40

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

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
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/super-simple-google-analytics/SuperSimpleGoogleAnalytics.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The bare bones options page.), #2 (Where to find your Google Analytics account number.), #3 (Source of the tracking code inserted just before </body>.)
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can look at the official readme.txt

super-simple-google-analytics/SuperSimpleGoogleAnalytics.php 85% from 13 tests

The main file in "Super Simple Google Analytics" v. 1.7.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 148 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("super-simple-google-analytics.php" instead of "SuperSimpleGoogleAnalytics.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
Success! There were no dangerous files found in this plugin251 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP13629181
PO File1122370

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png7.81KB4.08KB▼ 47.78%
screenshot-3.png8.15KB8.10KB▼ 0.59%
screenshot-1.png7.87KB7.56KB▼ 3.99%