10% adsense-now-lite

Code Review | Now! plugin for AdSense

WordPress plugin Now! plugin for AdSense scored 10% 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: 5.9.2
  • 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

500+ active / 226,563 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > 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: ▲0.05MB] [CPU: ▼287.40ms] Passed 4 tests

This is a short 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 /3.62 ▲0.1161.65 ▲10.24
Dashboard /wp-admin3.45 ▲0.0539.84 ▲6.74
Posts /wp-admin/edit.php3.68 ▲0.0443.17 ▲5.02
Add New Post /wp-admin/post-new.php6.98 ▲0.0199.03 ▼1,166.74
Media Library /wp-admin/upload.php3.39 ▲0.1029.70 ▲5.39

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 88 new files
Database: 1 new table, no new options
New tables
wp_ez_adsense_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Now! plugin for AdSense
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.98 ▲0.316.21 ▲0.162.41 ▼0.26
Dashboard /wp-admin2,897 ▲466.13 ▼0.05116.78 ▼17.14157.43 ▼1.71
Posts /wp-admin/edit.php2,693 ▲23.24 ▲0.0162.56 ▼1.61140.68 ▼5.60
Add New Post /wp-admin/post-new.php1,714 ▲5320.78 ▲4.29457.17 ▲34.65155.01 ▼0.60
Media Library /wp-admin/upload.php1,703 ▲55.53 ▼0.03140.92 ▲5.21186.06 ▲2.58
AdSense Now! Lite /wp-admin/wp-google-adsense.php260.940.0320.05

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_ez_adsense_options

Smoke tests 25% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/adsense-now-lite/adsense-now.php
    • > /wp-content/plugins/adsense-now-lite/wp-google-adsense.php
  • 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > 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 8
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/adsense-now-lite/adsense-now-frontend.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/adsense-now-lite/admin/promo.php:2
    • > PHP Notice
      Undefined variable: ezAdminUrl in wp-content/plugins/adsense-now-lite/admin/footer.php on line 22
    • > PHP Notice
      Undefined variable: ezAdminUrl in wp-content/plugins/adsense-now-lite/admin/footer.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/adsense-now-lite/admin/footer.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'EZWP' not found in wp-content/plugins/adsense-now-lite/admin/no-ajax.php:2
    • > PHP Notice
    • > PHP Fatal error
      Uncaught Error: Class 'EzGA' not found in wp-content/plugins/adsense-now-lite/admin/box-ad-alignment-options.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following user-side errors
    • > 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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #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 principal PHP file in "Now! plugin for AdSense" v. 6.20 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("adsense-now-lite.php" instead of "adsense-now.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 195 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
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

Cyclomatic complexity and code structure are the fingerprint of this plugin
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.46MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/ads-ez.png10.42KB4.52KB▼ 56.59%
screenshot-3.png19.78KB21.36KB0.00%
admin/img/install.png194.75KB56.39KB▼ 71.05%
admin/img/bootstrap-colorpicker/saturation.png8.61KB5.13KB▼ 40.41%
admin/img/bootstrap-colorpicker/hue-horizontal.png2.77KB0.47KB▼ 83.15%