10% quick-adsense-reloaded

Code Review | Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads

WordPress plugin Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads scored10%from 54 tests.

About plugin

  • Plugin page: quick-adsense-rel...
  • Plugin version: 2.0.79
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Dec 4, 2015
  • Latest release: Nov 9, 2023
  • Number of updates: 506
  • Update frequency: every 5.7 days
  • Top authors: wpquads (55.73%)ReneHermi (44.47%)

Code review

54 tests

User reviews

1079 reviews

Install metrics

40,000+ active /3,973,999 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/functions.php+7434
    unlink(wp-content/mu-plugins/wpquads_remove_shortcode.php): No such file or directory

Server metrics [RAM: ▲3.85MB] [CPU: ▲113.71ms] Passed 4 tests

An overview of server-side resources used by Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /6.81 ▲3.3461.90 ▲19.37
Dashboard /wp-admin7.30 ▲3.96217.69 ▲155.40
Posts /wp-admin/edit.php7.47 ▲4.11214.93 ▲174.17
Add New Post /wp-admin/post-new.php9.98 ▲4.09254.44 ▲159.18
Media Library /wp-admin/upload.php7.22 ▲4.00152.60 ▲120.90
Return to Classic view /wp-admin/admin.php?page=quads_switch_to_old7.18204.85
Settings /wp-admin/admin.php?page=quads-settings&path=settings7.27347.83
Ads /wp-admin/admin.php?page=quads-settings7.27327.06
Upgrade to PRO /wp-admin/admin.php?page=quads-addons7.22203.51

Server storage [IO: ▲8.24MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 350 new files
Database: 5 new tables, 20 new options
New tables
wp_quads_impressions_mobile
wp_quads_logs
wp_quads_clicks_desktop
wp_quads_impressions_desktop
wp_quads_clicks_mobile
New WordPress options
quads-mode
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
quadsAdResetDeleted
can_compress_scripts
quads_v2_db_no_import
widget_recent-posts
quads_rating_div
quads_show_theme_notice
...

Browser metrics Passed 4 tests

An overview of browser requirements for Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,138 ▲37614.81 ▲0.532.61 ▲0.8338.90 ▼5.57
Dashboard /wp-admin2,478 ▲3014.84 ▼0.77101.75 ▲12.3640.47 ▲3.55
Posts /wp-admin/edit.php2,390 ▲2902.55 ▲0.5747.51 ▲6.2344.05 ▲8.43
Add New Post /wp-admin/post-new.php6,330 ▲4,80425.34 ▲2.24930.66 ▲326.4938.22 ▼10.39
Media Library /wp-admin/upload.php1,669 ▲2754.46 ▲0.27116.38 ▲16.9949.46 ▲6.27
Return to Classic view /wp-admin/admin.php?page=quads_switch_to_old7,6826.2298.7788.79
Settings /wp-admin/admin.php?page=quads-settings&path=settings7,0135.2790.6882.89
Ads /wp-admin/admin.php?page=quads-settings7,0015.3184.2082.53
Upgrade to PRO /wp-admin/admin.php?page=quads-addons1,7512.0536.9392.02

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 5 tables
    • wp_quads_impressions_desktop
    • wp_quads_clicks_desktop
    • wp_quads_clicks_mobile
    • wp_quads_impressions_mobile
    • wp_quads_logs
  • This plugin did not uninstall successfully, leaving 20 options in the database
    • quads_install_date_flag
    • db_upgraded
    • quads_v2_db_no_import
    • widget_recent-posts
    • widget_recent-comments
    • widget_quads_ads_widget
    • can_compress_scripts
    • quadsAdReset
    • widget_theysaidso_widget
    • quadsAdReset_optionsDeleted
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=quads-settings
    • > Notice in wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/error.php+11
    Undefined variable: dashboardURL

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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/partials/footer.php
    • > /wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/error.php
    • > /wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/partials/header.php
    • > /wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/signup.php
    • > /wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/notices.php
  • 54× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant QUADS_VERSION - assumed 'QUADS_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/templates/ad.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/views/not_logged_in.php:43
    • > PHP Notice
      Undefined variable: adId in wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/templates/ad.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'wpquads\\Elements' not found in wp-content/plugins/quick-adsense-reloaded/includes/Forms/Elements/File.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'wpquads\\Elements' not found in wp-content/plugins/quick-adsense-reloaded/includes/Forms/Elements/Email.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'wpquads\\Elements' not found in wp-content/plugins/quick-adsense-reloaded/includes/Forms/ElementsWithOptions.php:8
    • > PHP Notice
      Undefined variable: adId in wp-content/plugins/quick-adsense-reloaded/includes/vendor/vi/templates/ad.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php:316
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/quick-adsense-reloaded/includes/admin/views/notices.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/quick-adsense-reloaded/includes/api.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Requires at least: Invalid plugin version format
You can take inspiration from this readme.txt

quick-adsense-reloaded/quick-adsense-reloaded.php 85% from 13 tests

"Ads by WPQuads – Adsense Ads, Banner Ads, Popup Ads" version 2.0.79's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected59,619 lines of code in 219 files:
LanguageFilesBlank linesComment linesLines of code
PHP954,6965,54924,886
JSX351,10915212,188
JavaScript459336157,029
CSS101,0423675,986
JSON4105,507
Sass25180203,397
PO File2200210568
Markdown333058

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 109)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity30.94
▷ Minimum class complexity1.00
▷ Maximum class complexity325.00
Average method complexity5.01
▷ Minimum method complexity1.00
▷ Maximum method complexity109.00
Code structure
Namespaces5
Interfaces2
Traits0
Classes59
▷ Abstract classes35.08%
▷ Concrete classes5694.92%
▷ Final classes11.79%
Methods484
▷ Static methods183.72%
▷ Public methods41385.33%
▷ Protected methods275.58%
▷ Private methods449.09%
Functions432
▷ Named functions38889.81%
▷ Anonymous functions4410.19%
Constants28
▷ Global constants1242.86%
▷ Class constants1657.14%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
97 PNG files occupy 0.52MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/js/src/images/medianet.png4.51KB2.21KB▼ 50.95%
admin/assets/js/src/images/htmlcode.png1.88KB1.42KB▼ 24.62%
admin/assets/js/src/images/rotator_ads_icon.png0.92KB1.22KB0.00%
admin/assets/js/src/images/floating_ads.png13.04KB4.37KB▼ 66.47%
admin/assets/js/src/images/quads-v2-logo.png7.68KB3.60KB▼ 53.07%