78% quick-adsense

Code Review | Quick Adsense

WordPress plugin Quick Adsense scored78%from 54 tests.

About plugin

  • Plugin page: quick-adsense
  • Plugin version: 2.8.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 20, 2009
  • Latest release: Jun 5, 2022
  • Number of updates: 62
  • Update frequency: every 74.9 days
  • Top authors: philipze (43.55%)namith.jawahar (29.03%)quickadsense (29.03%)toddynho (3.23%)

Code review

54 tests

User reviews

73 reviews

Install metrics

50,000+ active /1,953,486 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.66MB] [CPU: ▼1.65ms] Passed 4 tests

A check of server-side resources used by Quick Adsense
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.41 ▲0.6844.79 ▼0.89
Dashboard /wp-admin4.29 ▲0.7256.86 ▲5.15
Posts /wp-admin/edit.php4.34 ▲0.6653.96 ▲0.81
Add New Post /wp-admin/post-new.php6.80 ▲0.6694.12 ▼11.67
Media Library /wp-admin/upload.php4.15 ▲0.6645.12 ▲8.63

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 378 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
quick_adsense_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Quick Adsense
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲15913.49 ▼1.158.27 ▲6.4744.67 ▲3.21
Dashboard /wp-admin2,244 ▲645.63 ▲0.0388.24 ▼1.6339.15 ▼5.07
Posts /wp-admin/edit.php2,116 ▲161.99 ▼0.0137.28 ▲0.3033.68 ▼4.05
Add New Post /wp-admin/post-new.php1,567 ▲3523.49 ▲0.08681.16 ▼10.1161.12 ▲9.40
Media Library /wp-admin/upload.php1,422 ▲254.18 ▼0.08101.81 ▲0.8743.49 ▼1.30

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 uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • quick_adsense_settings
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quick-adsense/includes/templates/js/script-admin-notice.php
  • 32× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function quickadsense_get_control() in wp-content/plugins/quick-adsense/includes/templates/section-header-footer.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_textarea() in wp-content/plugins/quick-adsense/includes/templates/block-stats-chart.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/quick-adsense/includes/templates/block-general-assign-position.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-adsense/includes/defaults.php:71
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-adsense/includes/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/quick-adsense/includes/templates/block-general-quicktag.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/quick-adsense/includes/templates/block-general-appearance.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/quick-adsense/includes/templates/block-general-adsense.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/quick-adsense/includes/templates/page-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/quick-adsense/includes/templates/section-onpost-content.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: A description for screenshot #3 is missing in quick-adsense/assets to your readme.txt
  • Tags: There are too many tags (18 tag instead of maximum 10)
The official readme.txt is a good inspiration

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

The primary PHP file in "Quick Adsense" version 2.8.7 is used by WordPress to initiate all plugin functionality
104 characters long description:
Quick Adsense offers a quicker & flexible way to insert Google Adsense or any Ads code into a blog post.

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
There were no executable files found in this plugin255,495 lines of code in 368 files:
LanguageFilesBlank linesComment linesLines of code
PHP3632771,020253,890
CSS387451,081
JavaScript24811524

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity49.00
▷ Minimum class complexity7.00
▷ Maximum class complexity134.00
Average method complexity4.49
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods55
▷ Static methods916.36%
▷ Public methods4683.64%
▷ Protected methods23.64%
▷ Private methods712.73%
Functions39
▷ Named functions1743.59%
▷ Anonymous functions2256.41%
Constants10
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.32KB0.18KB▼ 44.00%
assets/css/images/ui-icons_454545_256x240.png6.92KB4.18KB▼ 39.61%
assets/css/images/ui-icons_222222_256x240.png6.86KB4.18KB▼ 39.05%
assets/css/images/ui-bg_glass_75_e6e6e6_1x400.png0.32KB0.15KB▼ 53.40%
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.32KB0.16KB▼ 50.46%