78% gplugin

Code Review | GPlugin: Google Ads for Wordpress & WooCommerce

WordPress plugin GPlugin: Google Ads for Wordpress & WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: gplugin
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2019
  • Latest release: Jun 5, 2019
  • Number of updates: 8
  • Update frequency: every 7.1 days
  • Top authors: eazydigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,353 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.10MB] [CPU: ▼2.07ms] Passed 4 tests

An overview of server-side resources used by GPlugin: Google Ads for Wordpress & WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0242.77 ▲2.52
Dashboard /wp-admin3.43 ▲0.1251.41 ▼0.50
Posts /wp-admin/edit.php3.54 ▲0.1857.63 ▲9.50
Add New Post /wp-admin/post-new.php6.03 ▲0.1491.41 ▼6.85
Media Library /wp-admin/upload.php3.35 ▲0.1239.20 ▼3.43

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for GPlugin: Google Ads for Wordpress & WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲9313.32 ▼0.651.75 ▼0.0252.70 ▲13.62
Dashboard /wp-admin2,231 ▲395.86 ▲0.77130.60 ▲9.3961.65 ▲13.60
Posts /wp-admin/edit.php2,120 ▲522.03 ▼0.0344.88 ▲3.6346.32 ▲10.51
Add New Post /wp-admin/post-new.php1,539 ▲2523.26 ▼0.38671.17 ▲10.21111.61 ▲40.63
Media Library /wp-admin/upload.php1,416 ▲284.35 ▲0.14105.72 ▼3.6056.93 ▲11.99

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 6× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/gplugin/admin/partials/gp-admin-budget-bidding.php
    • > /wp-content/plugins/gplugin/admin/partials/gp-admin-settings.php
    • > /wp-content/plugins/gplugin/public/partials/google-ad-public-display.php
    • > /wp-content/plugins/gplugin/admin/partials/gp-admin-jiraform.php
    • > /wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php
    • > /wp-content/plugins/gplugin/admin/partials/gp-admin-sidebar.php
  • 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php on line 39
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/gplugin/admin/partials/gp-admin-budget-bidding.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-budget-bidding.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php on line 31
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php on line 51
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php on line 35
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-budget-bidding.php on line 39
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/gplugin/admin/partials/gp-admin-ad-settings.php on line 46
    • > PHP Notice
      Undefined variable: vars in wp-content/plugins/gplugin/admin/partials/gp-admin-budget-bidding.php on line 39

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Donate link: Invalid url: "gplugin.uk"
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3 in gplugin/assets to your readme.txt
You can take inspiration from this readme.txt

gplugin/gplugin.php Passed 13 tests

Analyzing the main PHP file in "GPlugin: Google Ads for Wordpress & WooCommerce" version 0.1.0
135 characters long description:
All-in-One Google Ads plugin for Wordpress - WooCommerce. Tracking code management, Google campaign generator-manager-optimizer plugin.

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
No dangerous file extensions were detected9,978 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS41,208658,323
PHP152702541,390
JavaScript34643265

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity13.00
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods75
▷ Static methods45.33%
▷ Public methods4458.67%
▷ Protected methods00.00%
▷ Private methods3141.33%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/gplugin_logo.png8.20KB4.60KB▼ 43.86%
admin/img/googlepremierpartner-big.png15.33KB7.52KB▼ 50.92%
public/img/googlepremierpartner-big.png15.33KB7.52KB▼ 50.92%
admin/img/gplugin_logo.png8.20KB4.60KB▼ 43.86%
admin/img/logo_missing.png4.53KB1.93KB▼ 57.45%