66% ga-meta-tags

Code Review | GA Meta Tags

WordPress plugin GA Meta Tags scored66%from 54 tests.

About plugin

  • Plugin page: ga-meta-tags
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.2-4.6
  • WordPress version: 6.3.1
  • First release: Jun 27, 2016
  • Latest release: Sep 3, 2016
  • Number of updates: 12
  • Update frequency: every 5.8 days
  • Top authors: bloody_13 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,955 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼11.23ms] Passed 4 tests

A check of server-side resources used by GA Meta Tags
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0739.59 ▼6.52
Dashboard /wp-admin3.36 ▲0.0547.23 ▼0.40
Posts /wp-admin/edit.php3.40 ▲0.0548.96 ▼15.16
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.87 ▼22.85
Media Library /wp-admin/upload.php3.28 ▲0.0542.38 ▲10.26
Google Options /wp-admin/admin.php?page=ga-meta-tags-google3.2540.51
Main Options /wp-admin/admin.php?page=ga-meta-tags3.2632.58

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 20 new options
New WordPress options
ga_meta_tags_google_analytics
ga_meta_tags_google_tag_manager
can_compress_scripts
db_upgraded
ga_meta_tags_author
ga_meta_tags_language
ga_meta_tags_copyright
widget_recent-posts
ga_meta_tags_description
ga_meta_tags_keyword
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for GA Meta Tags
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲10313.71 ▼1.094.08 ▲1.8142.59 ▼0.34
Dashboard /wp-admin2,225 ▲375.91 ▲1.03106.85 ▼7.4377.92 ▲37.84
Posts /wp-admin/edit.php2,129 ▲402.08 ▲0.0539.12 ▼7.2236.33 ▲0.05
Add New Post /wp-admin/post-new.php1,699 ▲18522.62 ▲4.99602.75 ▼77.6738.86 ▼17.53
Media Library /wp-admin/upload.php1,425 ▲404.26 ▲0.06101.04 ▲1.6089.60 ▲48.41
Google Options /wp-admin/admin.php?page=ga-meta-tags-google1,2894.68119.1449.04
Main Options /wp-admin/admin.php?page=ga-meta-tags1,3904.76115.4838.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 20 options in the database
    • ga_meta_tags_google_webmaster
    • ga_meta_tags_google_author_page
    • ga_meta_tags_google_tag_manager
    • widget_recent-comments
    • ga_meta_tags_author
    • ga_meta_tags_language
    • widget_recent-posts
    • ga_meta_tags_description
    • ga_meta_tags_copyright
    • ga_meta_tags_google_analytics
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags-google
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-google.php+20
    Undefined variable: ga_meta_google_analytics
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags-google
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-google.php+32
    Undefined variable: ga_meta_google_webmaster
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags-google
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-google.php+44
    Undefined variable: ga_meta_google_author_profile
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags-google
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-google.php+56
    Undefined variable: ga_meta_google_author_page
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags-google
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-google.php+68
    Undefined variable: ga_meta_google_tag
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+20
    Undefined variable: ga_meta_desc
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+32
    Undefined variable: ga_meta_key
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+44
    Undefined variable: ga_meta_rob
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+56
    Undefined variable: ga_meta_rev
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+68
    Undefined variable: ga_meta_gen
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+80
    Undefined variable: ga_meta_aut
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+92
    Undefined variable: ga_meta_con
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+104
    Undefined variable: ga_meta_cop
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Notice in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php+116
    Undefined variable: ga_meta_lng

SRP 0% 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
The following issues need your attention
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-right.php
    • > /wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-footer.php
    • > /wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-header.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-home.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-google.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-functions.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ga-meta-tags/pages/ga-meta-tags-functions.php:15

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ga-meta-tags
    • > Javascript (severe) in unknown
    /wp-content/plugins/ga-meta-tags/js/bootstrap.min.js?ver=6.3.1 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
The official readme.txt is a good inspiration

ga-meta-tags/ga-meta-tags.php 92% from 13 tests

This is the main PHP file of "GA Meta Tags" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 216 characters long)

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
Success! There were no dangerous files found in this plugin525 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP74096476
CSS301047
JavaScript1052

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/check results.png12.89KB6.90KB▼ 46.48%
images/activate plugin.png10.22KB5.07KB▼ 50.41%
images/upload ga-meta plugin.png37.86KB15.46KB▼ 59.18%
images/go to plugins.png31.49KB13.04KB▼ 58.61%
images/edit and save options.png52.77KB30.04KB▼ 43.07%