77% ns-adblock-blocker

Code Review | NS AdBlock Blocker

WordPress plugin NS AdBlock Blocker scored77%from 54 tests.

About plugin

  • Plugin page: ns-adblock-blocker
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.3.29+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 6.3.1
  • First release: Jul 15, 2019
  • Latest release: Feb 7, 2022
  • Number of updates: 22
  • Update frequency: every 42.8 days
  • Top authors: nsthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,078 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼2.24ms] Passed 4 tests

Server-side resources used by NS AdBlock Blocker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1340.54 ▼2.57
Dashboard /wp-admin3.54 ▲0.2451.39 ▲1.48
Posts /wp-admin/edit.php3.59 ▲0.2458.63 ▲13.10
Add New Post /wp-admin/post-new.php6.04 ▲0.1581.67 ▼10.76
Media Library /wp-admin/upload.php3.38 ▲0.1537.66 ▲2.90
How to install premium version /wp-admin/admin.php?page=ns-rac-graph-stats3.3435.20
Adblock Blocker /wp-admin/admin.php?page=ns-adblock-blocker/ns-admin-options/ns_admin_option_dashboard.php3.4039.38
/wp-admin/admin.php?page=plugineye4203.3849.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 41 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
ns_ab_page
can_compress_scripts
abb_reviews_installed_on
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for NS AdBlock Blocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,986 ▲24015.01 ▲0.601.75 ▼0.2141.32 ▼3.59
Dashboard /wp-admin2,373 ▲1886.73 ▲1.86138.06 ▲32.1192.32 ▲45.63
Posts /wp-admin/edit.php2,297 ▲2083.53 ▲1.5154.09 ▲18.5676.25 ▲45.38
Add New Post /wp-admin/post-new.php1,552 ▲1823.46 ▲0.29661.23 ▼9.6738.11 ▼16.50
Media Library /wp-admin/upload.php1,436 ▲484.20 ▲0.0281.52 ▼19.7383.35 ▲40.86
How to install premium version /wp-admin/admin.php?page=ns-rac-graph-stats6921.7010.5119.03
Adblock Blocker /wp-admin/admin.php?page=ns-adblock-blocker/ns-admin-options/ns_admin_option_dashboard.php1,72410.11284.9595.16
/wp-admin/admin.php?page=plugineye4201,0923.2344.3349.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-comments
    • ns_ab_page
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • abb_reviews_installed_on
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=ns-rac-graph-stats
    • > Warning in wp-includes/pluggable.php+1438
    Cannot modify header information - headers already sent by (output started at wp-includes/script-loader.php:2838)

SRP 50% 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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ns-adblock-blocker/ns-adblock-blocker-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ns-adblock-blocker/plugineye/plugineye-ajax/plugineye_on_deactivation_function.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ns-adblock-blocker/ns-admin-options/inc.php:22

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

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots require images: #1 (FrontEnd.), #2 (BackEnd.)
  • Tags: Please reduce the number of tags, currently 14 tag instead of maximum 10
The official readme.txt might help

ns-adblock-blocker/ns-adblock-blocker.php 85% from 13 tests

Analyzing the main PHP file in "NS AdBlock Blocker" version 1.1.0
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/i18n" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin10,563 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,611
PHP121613191,083
CSS512329840
JavaScript24029

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity33.00
▷ Minimum class complexity20.00
▷ Maximum class complexity46.00
Average method complexity3.18
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods34
▷ Static methods1544.12%
▷ Public methods2058.82%
▷ Protected methods00.00%
▷ Private methods1441.18%
Functions23
▷ Named functions1252.17%
▷ Anonymous functions1147.83%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ns-admin-options/img/ns_banner_membership-500.png24.95KB26.27KB0.00%
screenshot-2.png82.29KB24.53KB▼ 70.20%
ns-admin-options/img/backend-sidebar-icon.png1.48KB0.54KB▼ 63.47%
screenshot-1.png23.38KB5.23KB▼ 77.61%