89% deadblocker

Code Review | deAdblocker

WordPress plugin deAdblocker scored 89% from 54 tests.

About plugin

  • Plugin page: deadblocker
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.6
  • WordPress version: 5.9.2
  • First release: Apr 7, 2016
  • Latest release: Jun 11, 2018
  • Number of updates: 9
  • Update frequency: every 88.6 days
  • Top authors: decollete (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

80+ active / 6,860 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼308.52ms] Passed 4 tests

This is a short check of server-side resources used by deAdblocker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0457.87 ▼2.93
Dashboard /wp-admin3.44 ▲0.0436.49 ▼52.79
Posts /wp-admin/edit.php3.67 ▲0.0342.72 ▲4.64
Add New Post /wp-admin/post-new.php6.90 ▼0.0794.31 ▼1,175.49
Media Library /wp-admin/upload.php3.32 ▲0.0226.28 ▼2.88
deAdblocker /wp-admin/options-general.php?page=deadblocker3.3426.05

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 1 new option
New WordPress options
deadblocker_options

Browser metrics Passed 4 tests

A check of browser resources used by deAdblocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,882 ▲12816.28 ▲0.2310.88 ▲4.872.60 ▲0.17
Dashboard /wp-admin2,897 ▲366.11 ▼0.15117.04 ▼23.42157.08 ▼14.08
Posts /wp-admin/edit.php2,693 ▲53.24 ▼0.1266.82 ▼34.91139.93 ▼34.12
Add New Post /wp-admin/post-new.php1,669 ▼2120.47 ▼1.14453.33 ▼15.88165.66 ▲4.50
Media Library /wp-admin/upload.php1,703 ▲95.52 ▲0.04148.97 ▲9.80188.41 ▼19.93
deAdblocker /wp-admin/options-general.php?page=deadblocker2,4878.56188.25218.80

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
This plugin's uninstaller ran successfully

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 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Abstract_Deco_Deadblocker' not found in wp-content/plugins/deadblocker/includes/class-admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Abstract_Deco_Deadblocker' not found in wp-content/plugins/deadblocker/includes/class-front.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=deadblocker
    • > Network (severe)
    wp-content/plugins/deadblocker/assets/css/deadblocker-admin.css?ver=1.0 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: prevent adblock, adblock, adblock detect, disable adblock

deadblocker/deadblocker.php Passed 13 tests

The main PHP script in "deAdblocker" version 1.0 is automatically included on every request by WordPress
118 characters long description:
deAdblocker detects AdBlock users and ask them to whitelist your site. Behavior and messages are configurable. Simple.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin1,141 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP5138139491
JavaScript76931430
Sass6320218
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity15.25
▷ Minimum class complexity4.00
▷ Maximum class complexity37.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes125.00%
▷ Concrete classes375.00%
▷ Final classes00.00%
Methods39
▷ Static methods820.51%
▷ Public methods3794.87%
▷ Protected methods12.56%
▷ Private methods12.56%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.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 compressed PNG files occupy 0.03MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tooltip2.png14.07KB14.79KB0.00%
assets/img/tooltip1.png13.19KB13.64KB0.00%