84% ad-blocking-advisor

Code Review | Ad Blocking Advisor

WordPress plugin Ad Blocking Advisor scored84%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: 6.3.1
  • 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

200+ active /11,706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.29ms] Passed 4 tests

An overview of server-side resources used by Ad Blocking Advisor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0939.12 ▼3.04
Dashboard /wp-admin3.40 ▲0.0952.54 ▲3.31
Posts /wp-admin/edit.php3.51 ▲0.1547.97 ▼2.42
Add New Post /wp-admin/post-new.php5.98 ▲0.0996.05 ▲1.00
Media Library /wp-admin/upload.php3.32 ▲0.0937.06 ▲3.94
Ad Blocking Advisor Settings /wp-admin/options-general.php?page=aba-settings3.2828.46

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 17 new options
New WordPress options
aba_background_color
theysaidso_admin_options
aba_show_banner_loggedin
aba_enabled
widget_recent-comments
aba_div_location
aba_show_banner_dismiss_icon
aba_cookie_allow
aba_font_color
widget_recent-posts
...

Browser metrics Passed 4 tests

A check of browser resources used by Ad Blocking Advisor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲18313.64 ▼0.655.32 ▲3.5843.06 ▲1.70
Dashboard /wp-admin2,206 ▲205.81 ▲0.74101.64 ▼8.2339.80 ▼6.19
Posts /wp-admin/edit.php2,092 ▼02.04 ▼0.0239.29 ▼1.1234.68 ▲1.58
Add New Post /wp-admin/post-new.php1,542 ▲2818.23 ▲0.67600.95 ▼70.3962.37 ▲12.83
Media Library /wp-admin/upload.php1,397 ▲94.28 ▲0.0997.98 ▲0.9146.01 ▲1.86
Ad Blocking Advisor Settings /wp-admin/options-general.php?page=aba-settings1,0082.0625.0535.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • aba_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Tags: You are using too many tags: 22 tag instead of maximum 10
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
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin445 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP310139357
CSS26563
JavaScript22125

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
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%