84% ad-blocking-advisor

Code Review | Ad Blocking Advisor

WordPress plugin Ad Blocking Advisor scored 84% from 54 tests.

About plugin

  • Plugin page: ad-blocking-advisor
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.9.1
  • WordPress version: 5.9.2
  • First release: Nov 10, 2015
  • Latest release: Dec 20, 2017
  • Number of updates: 49
  • Update frequency: every 15.7 days
  • Top authors: obrienlabs (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

300+ active / 11,131 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼296.49ms] Passed 4 tests

Server-side resources used by Ad Blocking Advisor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1355.23 ▲5.22
Dashboard /wp-admin3.51 ▲0.1032.98 ▼3.54
Posts /wp-admin/edit.php3.73 ▲0.0939.61 ▲0.75
Add New Post /wp-admin/post-new.php6.97 ▼0.0095.94 ▼1,185.09
Media Library /wp-admin/upload.php3.38 ▲0.0925.06 ▲1.94
Ad Blocking Advisor Settings /wp-admin/options-general.php?page=aba-settings3.3523.47

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 11 new options
New WordPress options
aba_show_banner_loggedin
aba_enabled
aba_version
aba_font_size
aba_notice_text
aba_font_color
aba_cookie_allow
aba_cookie_timeout
aba_background_color
aba_show_banner_dismiss_icon
...

Browser metrics Passed 4 tests

Checking browser requirements for Ad Blocking Advisor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,955 ▲20016.28 ▲0.4910.69 ▲4.722.31 ▲0.23
Dashboard /wp-admin2,895 ▲346.13 ▼0.00116.77 ▼21.30156.80 ▼8.30
Posts /wp-admin/edit.php2,695 ▲13.24 ▲0.0164.60 ▲0.23140.78 ▲1.72
Add New Post /wp-admin/post-new.php1,673 ▼3817.86 ▼3.71401.51 ▼31.14154.90 ▼1.66
Media Library /wp-admin/upload.php1,702 ▲45.54 ▲0.05142.27 ▼3.69182.68 ▼9.45
Ad Blocking Advisor Settings /wp-admin/options-general.php?page=aba-settings1,3052.3954.50138.08

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 1 option
    • aba_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/ad-blocking-advisor/ad-blocking-advisor.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: Too many tags (22 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

ad-blocking-advisor/ad-blocking-advisor.php 92% from 13 tests

The main PHP script in "Ad Blocking Advisor" version 2.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected445 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP310139357
CSS26563
JavaScript22125

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods22100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/OBrienLabs-Logo-h75px.png12.21KB4.67KB▼ 61.79%