88% ad-filter-injector

Code Review | WBP Ad Filter Injector

WordPress plugin WBP Ad Filter Injector scored 88% from 54 tests.

About plugin

  • Plugin page: ad-filter-injector
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.4.2
  • WordPress version: 5.9.2
  • First release: Nov 25, 2015
  • Latest release: Feb 10, 2016
  • Number of updates: 6
  • Update frequency: every 13.0 days
  • Top authors: johnniezombie (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,213 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by WBP Ad Filter Injector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0755.56 ▲1.43
Dashboard /wp-admin3.45 ▲0.0433.30 ▼1.79
Posts /wp-admin/edit.php3.69 ▲0.0437.46 ▼1.18
Add New Post /wp-admin/post-new.php6.93 ▼0.0495.46 ▼1,176.50
Media Library /wp-admin/upload.php3.34 ▲0.0424.44 ▼2.02
WBP Ad Filter Injector /wp-admin/plugins.php?page=wbpAdFilterPluginMenuPageDisplay3.4022.04

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 4 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WBP Ad Filter Injector
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,772 ▲1815.87 ▲0.156.38 ▼0.452.39 ▼0.58
Dashboard /wp-admin2,899 ▲386.13 ▼0.00119.31 ▼21.08161.79 ▼3.30
Posts /wp-admin/edit.php2,695 ▲43.23 ▲0.0062.93 ▼2.38146.21 ▲2.44
Add New Post /wp-admin/post-new.php1,673 ▼4418.25 ▼2.44400.99 ▼44.29160.11 ▼0.45
Media Library /wp-admin/upload.php1,702 ▲15.53 ▲0.04136.29 ▼9.34188.87 ▲8.97
WBP Ad Filter Injector /wp-admin/plugins.php?page=wbpAdFilterPluginMenuPageDisplay1,1162.3954.73137.92

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ad-filter-injector/wbp-ad-filter.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/ad-filter-injector/uninstall.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: filter, injector, ad rotator, shortcode, ads...

ad-filter-injector/wbp-ad-filter.php 92% from 13 tests

Analyzing the main PHP file in "WBP Ad Filter Injector" version 1.0.1
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("ad-filter-injector.php" instead of "wbp-ad-filter.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
Success! There were no dangerous files found in this plugin237 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions15100.00%
▷ Anonymous functions00.00%
▷ 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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wbp-logo.png1.12KB1.04KB▼ 6.47%
images/injector-icon.png7.50KB3.45KB▼ 54.02%