77% adblock-alerter

Code Review | adBlock Alerter

WordPress plugin adBlock Alerter scored77%from 54 tests.

About plugin

  • Plugin page: adblock-alerter
  • Plugin version: 0.8.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Jun 6, 2014
  • Latest release: Jun 7, 2014
  • Number of updates: 17
  • Update frequency: every 0.1 days
  • Top authors: SuperWebDev (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10+ active /3,144 total downloads


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.00MB] [CPU: ▼9.93ms] Passed 4 tests

A check of server-side resources used by adBlock Alerter
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.78 ▼2.94
Dashboard /wp-admin3.32 ▼0.0346.99 ▼15.27
Posts /wp-admin/edit.php3.37 ▲0.0146.73 ▼5.56
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.11 ▼15.94
Media Library /wp-admin/upload.php3.24 ▲0.0135.44 ▼2.16

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 10 new options
New WordPress options

Browser metrics Passed 4 tests

adBlock Alerter: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲10513.34 ▼0.842.57 ▲0.4541.66 ▲1.51
Dashboard /wp-admin2,224 ▲395.80 ▼0.01104.18 ▼3.3479.82 ▲31.86
Posts /wp-admin/edit.php2,104 ▲122.01 ▼0.0338.26 ▲0.3537.52 ▲2.70
Add New Post /wp-admin/post-new.php1,527 ▲1323.22 ▲5.59742.44 ▲50.0755.36 ▲4.77
Media Library /wp-admin/upload.php1,397 ▲94.22 ▼0.03102.73 ▼18.5383.55 ▲33.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adblock-alerter/includes/preview.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/adblock-alerter/includes/jj.php:33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/adblock-alerter/includes/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/adblock-alerter/adblock_alerter.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Contributors: Plugin contributors not specified
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can look at the official readme.txt

adblock-alerter/adblock_alerter.php 85% from 13 tests

Analyzing the main PHP file in "adBlock Alerter" version 0.8.5
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("adblock-alerter.php" instead of "adblock_alerter.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 304 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
Everything looks great! No dangerous files found in this plugin313 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/alerter.png1.18KB1.01KB▼ 14.62%
img/alert.png74.97KB27.64KB▼ 63.13%