89% easy-google-analytics-wp

Code Review | Easy Google Analytics WP

WordPress plugin Easy Google Analytics WP scored89%from 54 tests.

About plugin

  • Plugin page: easy-google-analy...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7.2
  • WordPress version: 6.3.1
  • First release: Aug 9, 2016
  • Latest release: Jul 9, 2021
  • Number of updates: 9
  • Update frequency: every 199.6 days
  • Top authors: gr8nilay (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /4,720 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.02MB] [CPU: ▼2.19ms] Passed 4 tests

A check of server-side resources used by Easy Google Analytics WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.48 ▼1.96
Dashboard /wp-admin3.33 ▲0.0350.27 ▼3.26
Posts /wp-admin/edit.php3.38 ▲0.0252.38 ▼2.31
Add New Post /wp-admin/post-new.php5.91 ▲0.0296.04 ▼1.23
Media Library /wp-admin/upload.php3.25 ▲0.0237.77 ▲2.34

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Google Analytics WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.33 ▼1.054.33 ▲2.6740.89 ▼3.05
Dashboard /wp-admin2,222 ▲315.82 ▲0.99101.70 ▼16.2969.19 ▲26.11
Posts /wp-admin/edit.php2,105 ▲161.97 ▼0.0738.87 ▼2.9834.96 ▼2.28
Add New Post /wp-admin/post-new.php1,544 ▲1618.24 ▼0.23696.82 ▲62.8059.73 ▲10.13
Media Library /wp-admin/upload.php1,398 ▲74.19 ▼0.01101.04 ▼4.1169.27 ▲25.75

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === easy-google-analytics-wp === )
  • Screenshots: Screenshot #1 (You can see that you only need to add Traking ID or script in back end) image missing
The official readme.txt is a good inspiration

easy-google-analytics-wp/easy-google-analytics-wp.php 92% from 13 tests

The main PHP script in "Easy Google Analytics WP" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 159 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin139 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP32137139

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.25KB17.70KB▼ 43.37%
assets/images/egawp.png0.55KB0.46KB▼ 16.28%