72% better-stop-adblock

Code Review | Better Stop Adblock

WordPress plugin Better Stop Adblock scored72%from 54 tests.

About plugin

  • Plugin page: better-stop-adblock
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 13, 2013
  • Latest release: Jun 25, 2014
  • Number of updates: 59
  • Update frequency: every 5.9 days
  • Top authors: bsa-block (100%)

Code review

54 tests

User reviews

22 reviews

Install metrics

50+ active /22,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.07ms] Passed 4 tests

Analyzing server-side resources used by Better Stop Adblock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0550.61 ▲8.86
Dashboard /wp-admin3.37 ▲0.0358.56 ▲0.37
Posts /wp-admin/edit.php3.42 ▲0.0748.34 ▼3.99
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.58 ▼12.24
Media Library /wp-admin/upload.php3.30 ▲0.0739.39 ▲3.58
B. Stop AdBlock /wp-admin/admin.php?page=bsa_settings_page3.3138.36
Info /wp-admin/admin.php?page=Info3.2631.84

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 52 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Better Stop Adblock
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.71 ▲0.252.11 ▲0.4648.94 ▲4.77
Dashboard /wp-admin2,208 ▲285.57 ▼0.08101.19 ▲13.4983.81 ▲44.88
Posts /wp-admin/edit.php2,128 ▲282.00 ▼0.0236.23 ▼4.6435.05 ▼2.99
Add New Post /wp-admin/post-new.php1,555 ▲2923.00 ▼0.60686.89 ▼3.3563.22 ▲11.20
Media Library /wp-admin/upload.php1,428 ▲314.22 ▲0.0396.83 ▼2.3377.10 ▲33.61
B. Stop AdBlock /wp-admin/admin.php?page=bsa_settings_page1,7658.41185.9479.96
Info /wp-admin/admin.php?page=Info1,0644.0999.1931.50

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

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

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/better-stop-adblock/bsa-info.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/better-stop-adblock/better-stop-adblock.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/better-stop-adblock/bsa-head.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/better-stop-adblock/bsa-var.php:1

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Info
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=Info
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention: The official readme.txt might help

better-stop-adblock/better-stop-adblock.php 92% from 13 tests

"Better Stop Adblock" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 154 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 plugin3,074 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PO File185945942,007
JavaScript31,42827828
PHP419229
CSS10010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 compressed PNG files occupy 0.05MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/text.png2.20KB1.76KB▼ 20.21%
img/mini.png0.99KB0.99KB0.49%
bsacolor/hs.png2.62KB7.54KB0.00%
bsacolor/hv.png2.80KB7.32KB0.00%
img/logo.png41.47KB42.91KB0.00%