84% wp-easy-google-analytics

Code Review | WP Easy Google Analytics

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

About plugin

  • Plugin page: wp-easy-google-an...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.7.1
  • WordPress version: 6.3.1
  • First release: Feb 10, 2017
  • Latest release: Apr 19, 2017
  • Number of updates: 10
  • Update frequency: every 6.7 days
  • Top authors: biagiodipace (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.30ms] Passed 4 tests

Analyzing server-side resources used by WP Easy Google Analytics
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.87 ▼1.46
Dashboard /wp-admin3.33 ▲0.0245.85 ▼5.45
Posts /wp-admin/edit.php3.38 ▲0.0246.01 ▲0.17
Add New Post /wp-admin/post-new.php5.91 ▲0.0280.31 ▼20.21
Media Library /wp-admin/upload.php3.25 ▲0.0232.33 ▼2.08
WP Easy Google Analytics /wp-admin/options-general.php?page=wp_easy_google_analytics3.2231.19

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
wp_easy_google_analytics_options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Easy Google Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7713.52 ▼1.2321.45 ▲19.3343.81 ▼5.62
Dashboard /wp-admin2,210 ▲194.82 ▼1.19113.42 ▲9.0638.30 ▼6.66
Posts /wp-admin/edit.php2,096 ▲71.99 ▲0.0040.36 ▼0.6534.27 ▼1.91
Add New Post /wp-admin/post-new.php1,517 ▼2117.75 ▼5.32680.02 ▲66.1750.98 ▼1.29
Media Library /wp-admin/upload.php1,395 ▲44.21 ▲0.0398.39 ▲1.3341.55 ▲0.74
WP Easy Google Analytics /wp-admin/options-general.php?page=wp_easy_google_analytics7742.0226.5825.88

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-easy-google-analytics/wp-easy-google-analytics.php:25

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-easy-google-analytics/wp-easy-google-analytics.php Passed 13 tests

The main PHP script in "WP Easy Google Analytics" version 1.1 is automatically included on every request by WordPress
59 characters long description:
Easy Google Analytics code integration on WordPress website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected85 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1232985

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
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%
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

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