10% google-adsense-lite

Code Review | Ads EZ Plugin for Google AdSense

WordPress plugin Ads EZ Plugin for Google AdSense scored10%from 54 tests.

About plugin

  • Plugin page: google-adsense-lite
  • Plugin version: 4.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.8
  • WordPress version: 6.3.1
  • First release: Oct 20, 2012
  • Latest release: Jul 31, 2017
  • Number of updates: 157
  • Update frequency: every 11.1 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

90+ active /113,611 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/google-adsense-lite/google-adsense-widget.php+43
    Function create_function() is deprecated

Server metrics [RAM: ▼1.77MB] [CPU: ▼56.70ms] Passed 4 tests

Server-side resources used by Ads EZ Plugin for Google AdSense
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.22 ▼1.248.64 ▼35.13
Dashboard /wp-admin2.24 ▼1.109.21 ▼57.07
Posts /wp-admin/edit.php2.25 ▼1.1110.14 ▼42.07
Add New Post /wp-admin/post-new.php2.24 ▼3.649.88 ▼92.54
Media Library /wp-admin/upload.php2.25 ▼0.9811.17 ▼25.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 90 new files
Database: 1 new table, 7 new options
New tables
wp_ez_adsense_options
New WordPress options
widget_ggadswidget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Ads EZ Plugin for Google AdSense: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,797 ▲3614.56 ▲0.091.76 ▲0.1645.23 ▲3.85
Dashboard /wp-admin2,202 ▲225.62 ▼0.0691.50 ▲1.2848.88 ▲10.20
Posts /wp-admin/edit.php2,107 ▲72.02 ▼0.0135.02 ▼5.2236.45 ▲0.62
Add New Post /wp-admin/post-new.php1,529 ▲323.56 ▼0.09685.99 ▲5.2054.91 ▲0.33
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.0298.60 ▼7.3347.68 ▲0.69
Google AdSense Lite /wp-admin/wp-google-adsense.php260.420.1115.62

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/google-adsense-lite/google-adsense-widget.php+43
    Function create_function() is deprecated
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ez_adsense_options
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_ggadswidget
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% 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 everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/google-adsense-lite/google-adsense.php
    • > /wp-content/plugins/google-adsense-lite/wp-google-adsense.php
  • 49× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/google-adsense-lite/admin/promo.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function openBox() in wp-content/plugins/google-adsense-lite/admin/box-ad-alignment.php:3
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/google-adsense-lite/ezKillLite.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/google-adsense-lite/EzWidget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/google-adsense-lite/EzWidget.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/google-adsense-lite/ezKillLite.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/google-adsense-lite/admin/box-ad-alignment-options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_login_url() in wp-content/plugins/google-adsense-lite/admin/lock.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/google-adsense-lite/admin/box-suppressing-ads-options.php:2
    • > PHP Warning
      chdir(): No such file or directory (errno 2) in wp-content/plugins/google-adsense-lite/EZWP.php on line 35

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/wp-google-adsense.php
    • > Network (severe)
    wp-admin/wp-google-adsense.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Ads EZ Plugin for Google AdSense "Overview" tab.), #2 (How to set the options for Ads EZ Plugin for Google AdSense.), #3 (Advanced configuration of the plugin.), #4 (Options to support safety, compatibility, mobile devices and category/post control.)
Please take inspiration from this readme.txt

google-adsense-lite/google-adsense.php 85% from 13 tests

The main PHP script in "Ads EZ Plugin for Google AdSense" version 4.20 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-adsense-lite.php" instead of "google-adsense.php")
  • Description: The description should be shorter than 140 characters (currently 245 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
There were no executable files found in this plugin6,967 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP43346644,375
CSS8152811,173
SVG200749
JavaScript86355670

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity33.42
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods150
▷ Static methods8154.00%
▷ Public methods150100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.48MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png58.49KB63.08KB0.00%
admin/img/bootstrap-colorpicker/hue.png2.90KB0.50KB▼ 82.71%
screenshot-2.png102.21KB112.04KB0.00%
admin/img/bootstrap-colorpicker/saturation.png8.61KB5.13KB▼ 40.41%
admin/img/install.png194.75KB56.39KB▼ 71.05%