68% kill-adblock

Code Review | Block AdBlock

WordPress plugin Block AdBlock scored68%from 54 tests.

About plugin

  • Plugin page: kill-adblock
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.9
  • WordPress version: 6.3.1
  • First release: Mar 28, 2016
  • Latest release: Jul 2, 2018
  • Number of updates: 27
  • Update frequency: every 30.6 days
  • Top authors: getadmiral (62.96%)mrkindy (40.74%)

Code review

54 tests

User reviews

26 reviews

Install metrics

300+ active /25,112 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.13MB] [CPU: ▼6.45ms] Passed 4 tests

An overview of server-side resources used by Block AdBlock
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.01 ▼3.27
Dashboard /wp-admin3.44 ▲0.1047.62 ▼11.26
Posts /wp-admin/edit.php3.56 ▲0.2049.02 ▼0.00
Add New Post /wp-admin/post-new.php6.02 ▲0.1488.73 ▼8.76
Media Library /wp-admin/upload.php3.37 ▲0.1436.76 ▼2.50

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 11 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
admiral_embed
admiral_property_promise_property_id
widget_recent-comments
admiral_property_id
widget_recent-posts
can_compress_scripts
admiral_property_promise_id
admiral_embed_expiration
...

Browser metrics Passed 4 tests

Block AdBlock: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12513.53 ▼0.828.66 ▲7.0645.29 ▲6.56
Dashboard /wp-admin2,210 ▲325.55 ▼0.1783.84 ▼26.5289.26 ▲48.53
Posts /wp-admin/edit.php2,121 ▲211.98 ▼0.0535.56 ▼3.8536.78 ▲3.96
Add New Post /wp-admin/post-new.php1,553 ▲2522.99 ▼0.24709.54 ▲78.2067.39 ▲2.00
Media Library /wp-admin/upload.php1,415 ▲244.09 ▼0.18101.07 ▼2.1469.08 ▲25.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 11 options
    • admiral_property_id
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • admiral_embed_expiration
    • admiral_property_promise_id
    • widget_recent-posts
    • admiral_embed
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/kill-adblock/init.php
    • > /wp-content/plugins/kill-adblock/admin-option.php
    • > /wp-content/plugins/kill-adblock/kill-adblock.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/kill-adblock/footer-message.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: adblock detector, block adblock, ads block, anti adblocker, detect adblock...

kill-adblock/kill-adblock.php Passed 13 tests

The principal PHP file in "Block AdBlock" v. 1.4 is loaded by WordPress automatically on each request
13 characters long description:
Block AdBlock

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/kill-adblock/vendor/caroots.crt
1,007 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP588118899
PO File24049108

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity57.00
▷ Minimum class complexity57.00
▷ Maximum class complexity57.00
Average method complexity3.79
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods21100.00%
▷ Public methods1466.67%
▷ Protected methods00.00%
▷ Private methods733.33%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants9
▷ Global constants111.11%
▷ Class constants888.89%
▷ Public constants8100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.44KB0.94KB▼ 34.75%
images/logo.png8.76KB4.40KB▼ 49.74%
images/logo2.png8.76KB4.40KB▼ 49.74%