78% adsplacer

Code Review | AdsPlace'r - Ad Manager, Inserter, AdSense Ads

WordPress plugin AdsPlace'r - Ad Manager, Inserter, AdSense Ads scored 78% from 54 tests.

About plugin

  • Plugin page: adsplacer
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.7
  • WordPress version: 5.9.2
  • First release: Aug 21, 2015
  • Latest release: Jun 12, 2021
  • Number of updates: 19
  • Update frequency: every 111.6 days
  • Top authors: mojwp (94.74%)wpshopbiz (10.53%)

Code review

54 tests

User reviews

4 reviews

Install metrics

5,000+ active / 35,784 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼2.30MB] [CPU: ▼350.13ms] Passed 4 tests

A check of server-side resources used by AdsPlace'r - Ad Manager, Inserter, AdSense Ads
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.445.55 ▼43.60
Dashboard /wp-admin2.09 ▼1.315.72 ▼27.48
Posts /wp-admin/edit.php2.09 ▼1.555.68 ▼33.32
Add New Post /wp-admin/post-new.php2.09 ▼4.915.68 ▼1,296.11
Media Library /wp-admin/upload.php2.09 ▼1.206.01 ▼18.40
Instruction /wp-admin/admin.php?page=adsplacer_support2.095.79
Settings /wp-admin/admin.php?page=adsplacer2.096.27

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for AdsPlace'r - Ad Manager, Inserter, AdSense Ads
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,826 ▲8215.97 ▲0.346.12 ▼0.871.96 ▼0.59
Dashboard /wp-admin2,929 ▲686.02 ▼0.15118.55 ▼12.04157.12 ▼1.69
Posts /wp-admin/edit.php2,728 ▲343.24 ▲0.0163.45 ▲0.38142.47 ▲2.46
Add New Post /wp-admin/post-new.php1,743 ▲8219.46 ▲2.88399.63 ▲7.47168.16 ▲14.84
Media Library /wp-admin/upload.php1,735 ▲435.48 ▼0.05146.39 ▲5.62188.71 ▲0.96
Instruction /wp-admin/admin.php?page=adsplacer_support1,0752.3853.91118.96
Settings /wp-admin/admin.php?page=adsplacer4,26020.27477.29199.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/adsplacer/adsplacer.php+45
    Trying to access array offset on value of type bool

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 36 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=adsplacer
    • > Notice in wp-content/plugins/adsplacer/adsplacer.php+533
    Trying to access array offset on value of type bool
  • 66 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=adsplacer
    • > Notice in wp-content/plugins/adsplacer/adsplacer.php+533
    Trying to access array offset on value of type null

SRP 50% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adsplacer/adsplacer.php

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

adsplacer/adsplacer.php Passed 13 tests

"AdsPlace'r - Ad Manager, Inserter, AdSense Ads" version 1.1.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
Manage ad blocks in the articles separately for visitors to the PC and mobile OS

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
Success! There were no dangerous files found in this plugin791 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP18511567
CSS1200125
PO File1192361
JavaScript17038

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity53.00
▷ Minimum class complexity53.00
▷ Maximum class complexity53.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin