87% adblock-alerter

Code Review | adBlock Alerter

WordPress plugin adBlock Alerter scored 87% 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: 5.9.2
  • 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 / 2,880 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼314.22ms] Passed 4 tests

A check of server-side resources used by adBlock Alerter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0554.01 ▲0.91
Dashboard /wp-admin3.44 ▲0.0335.20 ▼21.37
Posts /wp-admin/edit.php3.67 ▲0.0241.45 ▲2.87
Add New Post /wp-admin/post-new.php6.91 ▼0.0793.36 ▼1,239.27
Media Library /wp-admin/upload.php3.32 ▲0.0239.26 ▲13.08

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for adBlock Alerter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,813 ▲8715.33 ▲0.126.63 ▲0.612.19 ▼0.13
Dashboard /wp-admin2,911 ▲616.16 ▲0.03123.76 ▼4.19193.94 ▲24.62
Posts /wp-admin/edit.php2,707 ▲223.23 ▼0.0063.99 ▼32.06205.55 ▲59.74
Add New Post /wp-admin/post-new.php1,674 ▼14716.65 ▼5.36389.64 ▼89.66202.30 ▲45.94
Media Library /wp-admin/upload.php1,718 ▲235.57 ▲0.06144.18 ▼5.30207.55 ▲19.86

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adblock-alerter/includes/preview.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
  • Contributors: Plugin contributors not specified
Please take inspiration from this readme.txt

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

Analyzing the main PHP file in "adBlock Alerter" version 0.8.5
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 304 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adblock-alerter.php" instead of "adblock_alerter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected313 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
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%