94% ads-for-visual-composer

Code Review | Advanced Ads for WPBakery Page Builder

WordPress plugin Advanced Ads for WPBakery Page Builder scored 94% from 54 tests.

About plugin

  • Plugin page: ads-for-visual-co...
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 5.9.2
  • First release: Jun 16, 2016
  • Latest release: Mar 17, 2022
  • Number of updates: 29
  • Update frequency: every 72.4 days
  • Top authors: webzunft (86.21%)advancedads (17.24%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active / 53,581 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Advanced Ads for WPBakery Page Builder
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0152.36 ▲0.60
Dashboard /wp-admin3.42 ▲0.0133.27 ▼0.13
Posts /wp-admin/edit.php3.65 ▲0.0136.58 ▼2.18
Add New Post /wp-admin/post-new.php6.89 ▼0.0897.33 ▼1,186.09
Media Library /wp-admin/upload.php3.30 ▲0.0123.80 ▲1.07

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Ads for WPBakery Page Builder
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲6415.78 ▼0.245.49 ▼0.361.99 ▼0.25
Dashboard /wp-admin2,924 ▲636.14 ▼0.05120.79 ▼7.98155.52 ▼6.18
Posts /wp-admin/edit.php2,727 ▲333.23 ▼0.0063.10 ▲0.91139.38 ▲1.72
Add New Post /wp-admin/post-new.php1,684 ▲2316.88 ▲0.44410.27 ▲9.61148.36 ▼7.83
Media Library /wp-admin/upload.php1,736 ▲385.51 ▲0.01135.39 ▼1.67184.37 ▲0.51

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
This plugin's uninstaller ran successfully

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ads-for-visual-composer/advanced-ads-vc.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
10 plugin tags: adsense, ads, banners, addon, banner...

ads-for-visual-composer/advanced-ads-vc.php 85% from 13 tests

Analyzing the main PHP file in "Advanced Ads for WPBakery Page Builder" version 1.0.6
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("ads-for-visual-composer.php" instead of "advanced-ads-vc.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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 plugin103 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21740103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png1.98KB1.30KB▼ 34.22%