72% adsense-in-post-ads-by-oizuled

Code Review | In-Post Ads

WordPress plugin In-Post Ads scored72%from 54 tests.

About plugin

  • Plugin page: adsense-in-post-a...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.2
  • WordPress version: 6.3.1
  • First release: Dec 17, 2013
  • Latest release: May 3, 2023
  • Number of updates: 61
  • Update frequency: every 56.1 days
  • Top authors: scott.deluzio (98.36%)ampmode (3.28%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /65,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.10ms] Passed 4 tests

Analyzing server-side resources used by In-Post Ads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.16 ▲5.33
Dashboard /wp-admin3.35 ▼0.0049.58 ▼5.96
Posts /wp-admin/edit.php3.40 ▲0.0447.10 ▼1.06
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.18 ▼16.68
Media Library /wp-admin/upload.php3.27 ▲0.0435.48 ▼0.69
In-Post Ads /wp-admin/options-general.php?page=inpost-ads3.2129.60

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for In-Post Ads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲3214.37 ▼0.162.02 ▲0.2344.77 ▲5.26
Dashboard /wp-admin2,196 ▲195.50 ▼0.0684.55 ▲0.0836.54 ▼7.78
Posts /wp-admin/edit.php2,101 ▲11.94 ▼0.0735.20 ▼0.5833.29 ▼1.86
Add New Post /wp-admin/post-new.php6,369 ▲4,84327.65 ▲4.00937.84 ▲268.7840.21 ▼15.38
Media Library /wp-admin/upload.php1,404 ▲44.20 ▲0.0694.67 ▼21.1143.74 ▼11.50
In-Post Ads /wp-admin/options-general.php?page=inpost-ads8821.9925.4027.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=inpost-ads
    • > Notice in wp-content/plugins/adsense-in-post-ads-by-oizuled/includes/admin-settings-page.php+72
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/adsense-in-post-ads-by-oizuled/includes/admin-settings-page.php
    • > /wp-content/plugins/adsense-in-post-ads-by-oizuled/includes/updater.php
    • > /wp-content/plugins/adsense-in-post-ads-by-oizuled/includes/shortcodes.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adsense-in-post-ads-by-oizuled/blocks/adsense-ad-b.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adsense-in-post-ads-by-oizuled/blocks/adsense-ad-a.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adsense-in-post-ads-by-oizuled/blocks/adsense-ad-c.php:24

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: ads, ad, advertising, adsense, google...

adsense-in-post-ads-by-oizuled/adsense-inpost-ads.php 85% from 13 tests

Analyzing the main PHP file in "In-Post Ads" version 2.0.4
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adsense-in-post-ads-by-oizuled.php" instead of "adsense-inpost-ads.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected286 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP82363203
JavaScript3173966
CSS10017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin