10% anti-adblock-adbreach

Code Review | Anti-AdBlock Script

WordPress plugin Anti-AdBlock Script scored 10% from 54 tests.

About plugin

  • Plugin page: anti-adblock-adbr...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Mar 16, 2016
  • Latest release: May 14, 2016
  • Number of updates: 42
  • Update frequency: every 1.5 days
  • Top authors: Robin Heckmann (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 6,257 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)

Server metrics [RAM: ▼1.82MB] [CPU: ▲108.29ms] Passed 4 tests

An overview of server-side resources used by Anti-AdBlock Script
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.296.20 ▼37.75
Dashboard /wp-admin2.19 ▼1.12286.46 ▲231.22
Posts /wp-admin/edit.php2.19 ▼1.17216.90 ▲173.36
Add New Post /wp-admin/post-new.php2.19 ▼3.70221.07 ▲123.62
Media Library /wp-admin/upload.php2.19 ▼1.04208.26 ▲173.91

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The plugin illegally modified 1 file (0.02KB) outside of "wp-content/plugins/anti-adblock-adbreach/" and "wp-content/uploads/"
    • (new file) advertisement.js
Filesystem: 3 new files
Database: 2 new tables, 6 new options
New tables
wp_adbreach_images
wp_adbreach_adb_images
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Anti-AdBlock Script
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲21514.68 ▼0.081.80 ▲0.0142.80 ▼1.38
Dashboard /wp-admin2,358 ▲1706.44 ▲0.60116.39 ▲0.1337.72 ▼3.76
Posts /wp-admin/edit.php2,270 ▲1813.35 ▲1.3349.93 ▲14.1632.08 ▼2.32
Add New Post /wp-admin/post-new.php1,542 ▲921.07 ▼2.09590.76 ▼88.4834.82 ▼25.08
Media Library /wp-admin/upload.php1,403 ▲184.17 ▼0.0384.03 ▼27.8544.08 ▼3.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5905
    Function register_uninstall_hook was called incorrectly. Only a static class method or function can be used in an uninstall hook. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

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 | 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 items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/anti-adblock-adbreach/adbreach.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: adblock, adblock blocken, adblock umgehen, block adblock, anti adblock...

anti-adblock-adbreach/adbreach.php 69% from 13 tests

This is the main PHP file of "Anti-AdBlock Script" version 1.5.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("anti-adblock-adbreach.php" instead of "adbreach.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 395 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected419 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13520419

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity28.00
▷ Minimum class complexity28.00
▷ Maximum class complexity28.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods866.67%
▷ Protected methods00.00%
▷ Private methods433.33%
Functions5
▷ Named functions5100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/adbreach.png28.16KB5.42KB▼ 80.74%