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

Code Review | In-Post Ads

WordPress plugin In-Post Ads scored 82% 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-5.8.1
  • WordPress version: 5.9.2
  • First release: Dec 17, 2013
  • Latest release: Oct 14, 2021
  • Number of updates: 60
  • Update frequency: every 47.6 days
  • Top authors: scott.deluzio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active / 62,987 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼300.00ms] Passed 4 tests

This is a short check of server-side resources used by In-Post Ads
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0552.78 ▼7.47
Dashboard /wp-admin3.45 ▲0.0533.26 ▲2.06
Posts /wp-admin/edit.php3.68 ▲0.0436.72 ▲1.26
Add New Post /wp-admin/post-new.php6.92 ▼0.0595.11 ▼1,195.12
Media Library /wp-admin/upload.php3.33 ▲0.0423.67 ▲1.32
In-Post Ads /wp-admin/options-general.php?page=inpost-ads3.2727.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

In-Post Ads: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,768 ▲1415.89 ▼0.096.04 ▼1.022.35 ▼0.13
Dashboard /wp-admin2,894 ▲366.10 ▼0.09119.36 ▼12.61153.37 ▼5.63
Posts /wp-admin/edit.php2,693 ▼13.25 ▲0.0163.64 ▼0.67148.46 ▲6.97
Add New Post /wp-admin/post-new.php1,674 ▲1316.42 ▼5.86411.64 ▼20.27178.33 ▲25.35
Media Library /wp-admin/upload.php1,697 ▼45.55 ▲0.05135.32 ▼0.25185.37 ▲4.90
In-Post Ads /wp-admin/options-general.php?page=inpost-ads1,1172.4355.27117.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

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
These server-side errors were triggered
  • 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /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 errors 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-c.php:24
    • > 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-b.php:23

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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: google, advertising, adsense, ad, ads...

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: Please rename the main PHP file in this plugin to the plugin slug ("adsense-in-post-ads-by-oizuled.php" instead of "adsense-inpost-ads.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin286 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP82363203
JavaScript3173966
CSS10017

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin