78% adsense-plugin

Code Review | AdPush

WordPress plugin AdPush scored78%from 54 tests.

About plugin

  • Plugin page: adsense-plugin
  • Plugin version: 1.50
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.4
  • WordPress version: 6.3.1
  • First release: Nov 24, 2011
  • Latest release: Jan 19, 2022
  • Number of updates: 97
  • Update frequency: every 38.2 days
  • Top authors: bestwebsoft (92.78%)gasplugin (5.15%)namith.jawahar (4.12%)

Code review

54 tests

User reviews

97 reviews

Install metrics

3,000+ active /600,037 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.10MB] [CPU: ▲181.65ms] Passed 4 tests

Server-side resources used by AdPush
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.57 ▲1.1144.95 ▲5.64
Dashboard /wp-admin4.40 ▲1.10347.97 ▲296.00
Posts /wp-admin/edit.php4.45 ▲1.09289.31 ▲245.21
Add New Post /wp-admin/post-new.php7.00 ▲1.11336.66 ▲234.56
Media Library /wp-admin/upload.php4.32 ▲1.09273.35 ▲241.20

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 177 new files
Database: no new tables, 8 new options
New WordPress options
adsns_options
bstwbsftwppdtplgns_options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for AdPush
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲7414.26 ▼0.011.63 ▲0.0341.41 ▼1.76
Dashboard /wp-admin2,239 ▲655.61 ▲0.0889.87 ▼2.0337.96 ▲1.66
Posts /wp-admin/edit.php2,141 ▲622.01 ▲0.0336.11 ▼0.8631.55 ▼4.72
Add New Post /wp-admin/post-new.php1,563 ▲2823.26 ▲5.12596.84 ▼20.6057.69 ▼15.60
Media Library /wp-admin/upload.php1,438 ▲384.25 ▲0.06100.40 ▲0.0542.93 ▼2.09
Settings /wp-admin/adsense-plugin.php260.420.0915.40
Ads /wp-admin/adsense-list.php260.420.096.42
BWS Panel /wp-admin/adsense-plugin.php?page=adsns-bws-panel260.420.076.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/adsense-plugin/includes/adsns-list-table.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/adsense-plugin/includes/adsns-list-table.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/adsense-plugin/google_api/../autoload.php): failed to open stream: No such file or directory in wp-content/plugins/adsense-plugin/google_api/Collection.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/adsense-plugin/includes/adsns-list-table.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/adsense-plugin/bws_menu/product_list.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/adsense-plugin/google_api/Service/AdSense.php:32
    • > PHP Fatal error
      Uncaught Error: Class 'Bws_Settings_Tabs' not found in wp-content/plugins/adsense-plugin/includes/class-adsns-settings.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/adsense-plugin/adsense-plugin.php:2624
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/adsense-plugin/google_api/../autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/adsense-plugin/google_api/Collection.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/adsense-plugin.php
    • > Network (severe)
    wp-admin/adsense-plugin.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/adsense-list.php
    • > Network (severe)
    wp-admin/adsense-list.php - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/adsense-plugin.php?page=adsns-bws-panel
    • > Network (severe)
    wp-admin/adsense-plugin.php?page=adsns-bws-panel - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Ads Settings page (Unauthorized in Google AdSense and vi stories).), #2 (vi stories Sign Up form.), #3 (vi stories Log In form.), #4 (Ads Settings page (Authorized in Google AdSense and vi stories ).), #5 (Ads page (Authorized in Google AdSense).), #6 (vi stories Player customization form.), #7 (Google AdSense Ads and vi stories Ads in the front-end (Before the content).)
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt might help

adsense-plugin/adsense-plugin.php Passed 13 tests

This is the main PHP file of "AdPush" version 1.50, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
100 characters long description:
Add Adsense ads to pages, posts, custom posts, search results, categories, tags, pages, and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin28,852 lines of code in 94 files:
LanguageFilesBlank linesComment linesLines of code
PHP571,5893,85713,282
PO File124,0495,8768,848
CSS122282765,722
JavaScript9103144841
SVG400159

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.08
▷ Minimum class complexity1.00
▷ Maximum class complexity222.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity76.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes106
▷ Abstract classes65.66%
▷ Concrete classes10094.34%
▷ Final classes00.00%
Methods676
▷ Static methods131.92%
▷ Public methods61290.53%
▷ Protected methods202.96%
▷ Private methods446.51%
Functions96
▷ Named functions96100.00%
▷ Anonymous functions00.00%
Constants49
▷ Global constants24.08%
▷ Class constants4795.92%
▷ Public constants47100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
63 compressed PNG files occupy 3.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-bg_glass_75_e6e6e6_1x400.png0.32KB0.15KB▼ 53.40%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_888888_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/css/jquery-ui-styles/1.9.2/images/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%
bws_menu/css/jquery-ui-styles/1.12.1/images/ui-icons_cd0a0a_256x240.png4.57KB4.18KB▼ 8.43%