83% simple-google-analytics-by-webexpert

Code Review | simple google analytics by webexpert

WordPress plugin simple google analytics by webexpert scored83%from 54 tests.

About plugin

  • Plugin page: simple-google-ana...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: Oct 11, 2016
  • Number of updates: 4
  • Update frequency: every 91.8 days
  • Top authors: webexpert888 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,788 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.20ms] Passed 4 tests

Server-side resources used by simple google analytics by webexpert
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0143.62 ▲2.87
Dashboard /wp-admin3.35 ▲0.0455.49 ▲5.93
Posts /wp-admin/edit.php3.40 ▲0.0453.99 ▼3.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.00 ▼2.86
Media Library /wp-admin/upload.php3.29 ▲0.0639.49 ▲4.35

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by simple google analytics by webexpert
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.06 ▼0.341.85 ▼0.0242.47 ▲2.57
Dashboard /wp-admin2,198 ▲215.76 ▲0.1494.39 ▲1.0377.98 ▲38.18
Posts /wp-admin/edit.php2,121 ▲212.02 ▲0.0334.50 ▼6.1635.26 ▼2.75
Add New Post /wp-admin/post-new.php1,554 ▲1723.36 ▲5.13792.31 ▲157.3053.14 ▼6.28
Media Library /wp-admin/upload.php1,409 ▲94.19 ▼0.04100.84 ▼4.8465.25 ▲21.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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 trailingslashit() in wp-content/plugins/simple-google-analytics-by-webexpert/google_analytics_pro.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Admin Menu), #2 (Settings Page)
You can look at the official readme.txt

simple-google-analytics-by-webexpert/google_analytics_pro.php 85% from 13 tests

Analyzing the main PHP file in "simple google analytics by webexpert" version 1.1.0
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-google-analytics-by-webexpert.php" instead of "google_analytics_pro.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 282 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin3,598 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
CSS33572162,144
PHP112962101,294
JavaScript2162107
PO File1202153

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity36.75
▷ Minimum class complexity2.00
▷ Maximum class complexity173.00
Average method complexity4.97
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods72
▷ Static methods00.00%
▷ Public methods72100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
8 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/welogomed.png2.49KB1.27KB▼ 48.96%
screenshot/screenshot-1.png24.00KB7.21KB▼ 69.94%
assets/images/placeholder.png2.75KB2.92KB0.00%
(invalid) assets/images/question_mark.png0.86KB0.00KB▼ 100.00%
screenshot/screenshot-2.png40.23KB23.41KB▼ 41.80%