89% simple-google-analytics-by-st

Code Review | Simple Google Analytics by ST

WordPress plugin Simple Google Analytics by ST scored89%from 54 tests.

About plugin

  • Plugin page: simple-google-ana...
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Mar 26, 2019
  • Number of updates: 16
  • Update frequency: every 0.5 days
  • Top authors: sumant22 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /590 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼6.53ms] Passed 4 tests

A check of server-side resources used by Simple Google Analytics by ST
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0144.79 ▲1.38
Dashboard /wp-admin3.32 ▼0.0348.43 ▼16.12
Posts /wp-admin/edit.php3.37 ▲0.0148.06 ▼2.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0196.22 ▼8.99
Media Library /wp-admin/upload.php3.24 ▲0.0139.26 ▲1.41
Add Google Analytics /wp-admin/options-general.php?page=sgabst-google-analytics3.2132.83

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Google Analytics by ST
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7213.57 ▼0.831.83 ▼0.1644.92 ▲0.11
Dashboard /wp-admin2,225 ▲225.85 ▼0.0599.79 ▼5.8840.93 ▼2.32
Posts /wp-admin/edit.php2,104 ▲41.97 ▼0.0347.76 ▲10.3943.33 ▲7.86
Add New Post /wp-admin/post-new.php1,529 ▼217.72 ▼5.61666.33 ▲6.8455.13 ▼1.12
Media Library /wp-admin/upload.php1,398 ▼54.26 ▲0.02103.29 ▼4.6345.36 ▼1.77
Add Google Analytics /wp-admin/options-general.php?page=sgabst-google-analytics8332.0123.1946.49

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% 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 require attention:
  • Donate link: Invalid URI ("#")
  • Tags: There are too many tags (11 tag instead of maximum 10)
  • Screenshots: Please add an image for screenshot #1 (Google Analytics Setting main screen.)
The official readme.txt is a good inspiration

simple-google-analytics-by-st/sgabst.php 92% from 13 tests

Analyzing the main PHP file in "Simple Google Analytics by ST" version 1.0.3
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-google-analytics-by-st.php" instead of "sgabst.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin174 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP33329124
CSS15050

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin