83% advanced-ads-adsense-in-feed

Code Review | In-feed ads for Google AdSense

WordPress plugin In-feed ads for Google AdSense scored83%from 54 tests.

About plugin

  • Plugin page: advanced-ads-adse...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Oct 25, 2017
  • Latest release: Apr 3, 2023
  • Number of updates: 28
  • Update frequency: every 70.9 days
  • Top authors: webzunft (75%)advancedads (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

10,000+ active /185,719 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.48ms] Passed 4 tests

A check of server-side resources used by In-feed ads for Google AdSense
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.00 ▲0.38
Dashboard /wp-admin3.31 ▲0.0149.50 ▼4.61
Posts /wp-admin/edit.php3.36 ▲0.0149.91 ▼1.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.86 ▼15.79
Media Library /wp-admin/upload.php3.24 ▲0.0143.78 ▲5.25

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for In-feed ads for Google AdSense
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4213.26 ▼1.125.03 ▲3.1243.40 ▼1.91
Dashboard /wp-admin2,231 ▲315.86 ▲0.0497.93 ▼13.2439.10 ▼4.52
Posts /wp-admin/edit.php2,113 ▲132.13 ▲0.1436.66 ▲0.9234.01 ▼3.24
Add New Post /wp-admin/post-new.php1,557 ▲323.30 ▼0.13665.36 ▼32.6149.04 ▼7.66
Media Library /wp-admin/upload.php1,413 ▲134.31 ▲0.0797.04 ▼7.7744.84 ▼3.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-ads-adsense-in-feed/advanced-ads-in-feed.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt is a good inspiration

advanced-ads-adsense-in-feed/advanced-ads-in-feed.php 85% from 13 tests

Analyzing the main PHP file in "In-feed ads for Google AdSense" version 1.1.3
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-ads-adsense-in-feed.php" instead of "advanced-ads-in-feed.php")
  • Domain Path: The domain path folder does not exist ("/languages")

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
Everything looks great! No dangerous files found in this plugin133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12378133

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.93
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity4.60
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
adsense-in-feed.png8.06KB7.27KB▼ 9.80%