84% easy-web-analytics-integration

Code Review | Easy Web Analytics Integration

WordPress plugin Easy Web Analytics Integration scored84%from 54 tests.

About plugin

  • Plugin page: easy-web-analytic...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-4.2.4
  • WordPress version: 6.3.1
  • First release: Aug 19, 2015
  • Latest release: Aug 19, 2015
  • Number of updates: 4
  • Update frequency: every 0.3 days
  • Top authors: samiullah-kaifi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /963 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by Easy Web Analytics Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.43 ▼2.86
Dashboard /wp-admin3.32 ▲0.0144.05 ▼1.33
Posts /wp-admin/edit.php3.37 ▲0.0142.98 ▼5.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0179.30 ▼15.67
Media Library /wp-admin/upload.php3.24 ▲0.0134.71 ▲1.76
Easy Web Analytics Integration /wp-admin/options-general.php?page=googleanalyticsad3.2030.10

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
web_property_tc
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Web Analytics Integration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.20 ▼1.234.41 ▲2.8440.79 ▲2.72
Dashboard /wp-admin2,210 ▲185.83 ▲0.8994.93 ▼19.1238.74 ▼0.55
Posts /wp-admin/edit.php2,093 ▲42.03 ▼0.0136.57 ▼3.0341.53 ▲5.91
Add New Post /wp-admin/post-new.php1,536 ▲823.38 ▲0.33679.94 ▲14.7652.72 ▼5.17
Media Library /wp-admin/upload.php1,392 ▲14.22 ▲0.0296.62 ▼0.3545.48 ▲3.43
Easy Web Analytics Integration /wp-admin/options-general.php?page=googleanalyticsad8922.0526.9327.80

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/easy-web-analytics-integration/options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-web-analytics-integration/googleanalytics.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Easy Web Analytics Integration Menu.), #2 (Easy Web Analytics Integration settings page.)
Please take inspiration from this readme.txt

easy-web-analytics-integration/googleanalytics.php 92% from 13 tests

Analyzing the main PHP file in "Easy Web Analytics Integration" version 1.0.0
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("easy-web-analytics-integration.php" instead of "googleanalytics.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 plugin88 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP216888

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for 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.30
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
4 PNG files occupy 0.26MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/step-2.png8.65KB8.54KB▼ 1.37%
images/step-1.png76.09KB31.35KB▼ 58.81%
Screenshot-02.png138.82KB40.63KB▼ 70.73%
Screenshot-01.png37.70KB11.41KB▼ 69.75%