78% unblock-adblocker

Code Review | Unblock Adblocker

WordPress plugin Unblock Adblocker scored78%from 54 tests.

About plugin

  • Plugin page: unblock-adblocker
  • Plugin version: 1.4.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Jun 16, 2022
  • Number of updates: 13
  • Update frequency: every 40.0 days
  • Top authors: jabedbd (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /1,939 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼4.05ms] Passed 4 tests

Analyzing server-side resources used by Unblock Adblocker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3840.77 ▲0.54
Dashboard /wp-admin3.71 ▲0.4051.85 ▼0.07
Posts /wp-admin/edit.php3.76 ▲0.4048.78 ▼0.52
Add New Post /wp-admin/post-new.php6.22 ▲0.3384.01 ▼16.13
Media Library /wp-admin/upload.php3.57 ▲0.3338.92 ▲2.23

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
unblockadblocker-review-notify
db_upgraded
unblockadblocker-install-date
unblockadblocker-options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Unblock Adblocker: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9413.18 ▼1.201.93 ▲0.0645.03 ▲1.92
Dashboard /wp-admin2,219 ▲284.83 ▼1.07113.66 ▲10.0142.68 ▼2.49
Posts /wp-admin/edit.php2,102 ▲132.01 ▲0.0134.90 ▲0.0432.94 ▲1.00
Add New Post /wp-admin/post-new.php1,538 ▲923.15 ▲4.96683.24 ▲62.8259.58 ▼5.20
Media Library /wp-admin/upload.php1,407 ▲194.20 ▼0.00104.16 ▲7.5945.01 ▼0.09

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • unblockadblocker-install-date
    • theysaidso_admin_options
    • unblockadblocker-review-notify
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% 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 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/unblock-adblocker/public/partials/unblockadblocker-public-display.php
    • > /wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-section-style.php
    • > /wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-section-options.php
    • > /wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-section-content.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-field-radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function network_admin_url() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-page-settings.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-field-checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-field-editor.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-field-text.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-alpha-color-picker.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-color-picker.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-field-select.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/unblock-adblocker/admin/partials/unblockadblocker-admin-page-sidebar.php:15

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 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === unblock-adblocker === )
Please take inspiration from this readme.txt

unblock-adblocker/unblock-adblocker.php 92% from 13 tests

"Unblock Adblocker" version 1.4.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin2,425 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP236769441,917
JavaScript49259369
CSS3283139

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity20.25
▷ Minimum class complexity1.00
▷ Maximum class complexity79.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods84
▷ Static methods55.95%
▷ Public methods7386.90%
▷ Protected methods00.00%
▷ Private methods1113.10%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
There are no PNG files in this plugin