78% ad-blocking-alert

Code Review | Ad Blocking Alert

WordPress plugin Ad Blocking Alert scored 78% from 54 tests.

About plugin

  • Plugin page: ad-blocking-alert
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5
  • WordPress version: 6.3.1
  • First release: Nov 16, 2015
  • Latest release: Apr 26, 2016
  • Number of updates: 8
  • Update frequency: every 20.2 days
  • Top authors: deano1987 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,423 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼1.80ms] Passed 4 tests

Analyzing server-side resources used by Ad Blocking Alert
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.59 ▲0.08
Dashboard /wp-admin3.33 ▲0.0245.61 ▼3.07
Posts /wp-admin/edit.php3.38 ▲0.0247.21 ▲0.40
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.66 ▼3.01
Media Library /wp-admin/upload.php3.25 ▲0.0234.73 ▼1.18

Server storage [IO: ▲0.10MB] [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
adb_display_status
adb_status
theysaidso_admin_options
widget_recent-comments
adb_display_message
widget_theysaidso_widget
adb_display_image
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Ad Blocking Alert
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,136 ▲40113.33 ▼1.345.60 ▲3.8343.48 ▲4.14
Dashboard /wp-admin2,221 ▲305.83 ▲0.9197.41 ▼5.1474.40 ▲33.47
Posts /wp-admin/edit.php2,107 ▲182.01 ▼0.0239.35 ▼0.3234.63 ▼2.63
Add New Post /wp-admin/post-new.php1,680 ▲14622.12 ▼0.86779.66 ▲76.0265.32 ▲6.66
Media Library /wp-admin/upload.php1,397 ▲124.19 ▼0.0699.31 ▼8.3747.95 ▼4.67

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ad-blocking-alert/includes/preview.php
  • 3× 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-alert/ad-blocking-alert.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ad-blocking-alert/includes/jj.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/ad-blocking-alert/includes/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
The official readme.txt might help

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

"Ad Blocking Alert" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 238 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin328 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP43013199
CSS214181
JavaScript211248

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.14
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.09MB with 0.07MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/alert.png74.97KB27.64KB▼ 63.13%
img/alerter.png15.25KB1.26KB▼ 91.75%