68% xt-google-ads

Code Review | XT Google Ads

WordPress plugin XT Google Ads scored68%from 54 tests.

About plugin

  • Plugin page: xt-google-ads
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.4
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: Mar 5, 2018
  • Number of updates: 26
  • Update frequency: every 39.2 days
  • Top authors: xtrsyz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,283 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼36.91ms] Passed 4 tests

This is a short check of server-side resources used by XT Google Ads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0329.66 ▼15.19
Dashboard /wp-admin2.99 ▼0.3128.68 ▼21.55
Posts /wp-admin/edit.php3.00 ▼0.3623.45 ▼27.69
Add New Post /wp-admin/post-new.php3.00 ▼2.8926.66 ▼79.29
Media Library /wp-admin/upload.php3.00 ▼0.2318.36 ▼19.12

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
xt_google_ads_default
widget_theysaidso_widget
db_upgraded
xt_google_ads_default_time
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for XT Google Ads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.24 ▼0.101.87 ▲0.0142.77 ▲4.24
Dashboard /wp-admin2,215 ▲385.60 ▼0.0588.64 ▼3.2040.80 ▼6.64
Posts /wp-admin/edit.php2,123 ▲202.02 ▲0.0835.11 ▼3.8334.33 ▼8.30
Add New Post /wp-admin/post-new.php6,244 ▲4,71826.06 ▲2.33901.72 ▲203.2458.03 ▼11.08
Media Library /wp-admin/upload.php1,423 ▲264.26 ▲0.01101.79 ▼7.0942.27 ▼9.95
XT Google Ads /wp-admin/xt-google-ads.php260.420.0715.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • xt_google_ads_default
    • xt_google_ads_default_time
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined index: xt_google_ads_code in wp-content/plugins/xt-google-ads/xt-google-ads-page.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xt-google-ads/xt-google-ads.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/xt-google-ads/xt-google-ads-page.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/xt-google-ads.php
    • > Network (severe)
    wp-admin/xt-google-ads.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: adsense, posts, contents, ads, google

xt-google-ads/xt-google-ads.php Passed 13 tests

The entry point to "XT Google Ads" version 1.3 is a PHP file that has certain tags in its header comment area
45 characters long description:
Just plugin to show Google Ads on every page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected185 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22417185

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
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%
Functions12
▷ Named functions12100.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