94% ad-block-defender

Code Review | Ad Block Defender

WordPress plugin Ad Block Defender scored 94% from 54 tests.

About plugin

  • Plugin page: ad-block-defender
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4.1
  • WordPress version: 5.8.1
  • First release: Jan 23, 2016
  • Latest release: Jan 26, 2016
  • Number of updates: 22
  • Update frequency: every 0.2 days
  • Top authors: ipdmsolutions (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,554 total downloads

Benchmarks

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: ▼141.57ms] Passed 4 tests

Analyzing server-side resources used by Ad Block Defender
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.75 ▲14.48
Dashboard /wp-admin3.06 ▲0.0145.46 ▲9.59
Posts /wp-admin/edit.php3.11 ▲0.0141.97 ▼3.05
Add New Post /wp-admin/post-new.php5.42 ▼0.0195.89 ▼566.66
Media Library /wp-admin/upload.php3.01 ▲0.0028.03 ▼6.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ad Block Defender
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲21216.32 ▲0.8312.77 ▲3.6751.51 ▲3.87
Dashboard /wp-admin2,966 ▲325.89 ▼0.07143.82 ▼3.25117.60 ▲0.48
Posts /wp-admin/edit.php2,739 ▼02.68 ▼0.0274.10 ▲7.5494.48 ▼3.65
Add New Post /wp-admin/post-new.php1,683 ▼018.74 ▼0.04405.42 ▼0.84112.38 ▼0.69
Media Library /wp-admin/upload.php1,807 ▼05.02 ▲0.00166.87 ▼10.09131.11 ▲5.21

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ad-block-defender/index.php:20

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: adblock, advertisement, ad, defender, block

ad-block-defender/index.php 92% from 13 tests

The entry point to "Ad Block Defender" version 1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ad-block-defender.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected11 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1679
JavaScript2002

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin