10% adsense-now-lite

Code Review | Now! plugin for AdSense

WordPress plugin Now! plugin for AdSense scored10%from 54 tests.

About plugin

  • Plugin page: adsense-now-lite
  • Plugin version: 6.20
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.8
  • WordPress version: 6.3.1
  • First release: Nov 2, 2011
  • Latest release: Jul 31, 2017
  • Number of updates: 178
  • Update frequency: every 11.8 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

300+ active /228,302 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/adsense-now-lite/adsense-now-frontend.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; AdSenseNowFront has a deprecated constructor

Server metrics [RAM: ▼1.57MB] [CPU: ▼49.16ms] Passed 4 tests

A check of server-side resources used by Now! plugin for AdSense
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.43 ▼1.0410.69 ▼29.56
Dashboard /wp-admin2.45 ▼0.9018.67 ▼46.04
Posts /wp-admin/edit.php2.45 ▼0.9111.39 ▼35.61
Add New Post /wp-admin/post-new.php2.45 ▼3.4413.53 ▼85.44
Media Library /wp-admin/upload.php2.45 ▼0.7813.28 ▼21.01

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 88 new files
Database: 1 new table, 6 new options
New tables
wp_ez_adsense_options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Now! plugin for AdSense
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3713.58 ▼0.661.67 ▼0.0841.39 ▲0.59
Dashboard /wp-admin2,210 ▲195.93 ▲1.04107.66 ▲2.9735.89 ▼16.19
Posts /wp-admin/edit.php2,096 ▲252.01 ▼0.0038.77 ▲3.2233.99 ▲1.99
Add New Post /wp-admin/post-new.php1,536 ▲2223.20 ▲5.57653.62 ▲27.9855.57 ▲5.06
Media Library /wp-admin/upload.php1,395 ▲44.20 ▼0.0793.78 ▼3.1141.26 ▼0.93
AdSense Now! Lite /wp-admin/wp-google-adsense.php260.440.1016.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/adsense-now-lite/adsense-now-frontend.php+3
    Methods with the same name as their class will not be constructors in a future version of PHP; AdSenseNowFront has a deprecated constructor
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_ez_adsense_options
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/adsense-now-lite/adsense-now.php
    • > /wp-content/plugins/adsense-now-lite/wp-google-adsense.php
  • 47× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_login_url() in wp-content/plugins/adsense-now-lite/admin/lock.php:13
    • > PHP Notice
      Undefined variable: ezAdminUrl in wp-content/plugins/adsense-now-lite/admin/footer.php on line 14
    • > PHP Warning
      chdir(): No such file or directory (errno 2) in wp-content/plugins/adsense-now-lite/EZWP.php on line 35
    • > PHP Notice
      Undefined variable: ezAdminUrl in wp-content/plugins/adsense-now-lite/admin/footer.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/adsense-now-lite/admin/tour.php:2
    • > PHP Notice
      Undefined variable: ezAdminUrl in wp-content/plugins/adsense-now-lite/admin/footer.php on line 19
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/adsense-now-lite/ezKillLite.php on line 21
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/adsense-now-lite/admin/footer.php:24
    • > PHP Notice

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
    • > 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 important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Now! Plugin for AdSense Dashboard.), #2 (How to set the options for Now! Plugin for AdSense.), #3 (Advanced configuration of the plugin.), #4 (Options to support safety, compatibility, mobile devices and category/post control.)
The official readme.txt is a good inspiration

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

The main file in "Now! plugin for AdSense" v. 6.20 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adsense-now-lite.php" instead of "adsense-now.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 195 characters long)

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 detected6,776 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP41318634,184
CSS8152811,173
SVG200749
JavaScript86355670

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity38.50
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.80
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods134
▷ Static methods8059.70%
▷ Public methods134100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
12 PNG files occupy 0.46MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/bootstrap-colorpicker/alpha-horizontal.png3.55KB1.62KB▼ 54.44%
screenshot-4.png56.58KB61.26KB0.00%
admin/img/bootstrap-colorpicker/hue-horizontal.png2.77KB0.47KB▼ 83.15%
admin/img/ads-ez.png10.42KB4.52KB▼ 56.59%
screenshot-1.png62.38KB66.23KB0.00%