77% jet-blocker-anti-ad-blocker-detector

Code Review | JetBlocker Anit AdBlocker Detector

WordPress plugin JetBlocker Anit AdBlocker Detector scored77%from 54 tests.

About plugin

  • Plugin page: jet-blocker-anti-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Aug 26, 2022
  • Latest release: Mar 13, 2023
  • Number of updates: 5
  • Update frequency: every 39.8 days
  • Top authors: teknofraction (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,250 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.60ms] Passed 4 tests

An overview of server-side resources used by JetBlocker Anit AdBlocker Detector
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.59 ▼5.05
Dashboard /wp-admin3.33 ▲0.0348.90 ▼1.51
Posts /wp-admin/edit.php3.39 ▲0.0351.26 ▼0.18
Add New Post /wp-admin/post-new.php5.93 ▲0.0585.74 ▼3.67
Media Library /wp-admin/upload.php3.26 ▲0.0336.49 ▲1.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 14 new options
New WordPress options
widget_recent-comments
jetblocker_donate_link
jetblocker_heading
jetblocker_subheading
jetblocker_fullscreen
whitelist_btn_text
db_upgraded
jetblocker_text
theysaidso_admin_options
jetblocker_donate_btn_text
...

Browser metrics Passed 4 tests

A check of browser resources used by JetBlocker Anit AdBlocker Detector
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲21813.81 ▼0.469.38 ▲7.2327.81 ▼20.52
Dashboard /wp-admin2,218 ▲515.61 ▼0.0192.92 ▼16.6944.07 ▲0.59
Posts /wp-admin/edit.php2,120 ▲172.03 ▲0.0239.03 ▼2.6938.49 ▲1.62
Add New Post /wp-admin/post-new.php1,543 ▲1522.95 ▼0.18668.41 ▼17.1154.48 ▲0.08
Media Library /wp-admin/upload.php1,423 ▲204.16 ▼0.0498.17 ▼5.1242.10 ▼3.79

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 14 options in the database
    • whitelist_btn_text
    • widget_recent-comments
    • jetblocker_text
    • jetblocker_fullscreen
    • jetblocker_heading
    • jetblocker_subheading
    • jetblocker_switch
    • db_upgraded
    • jetblocker_donate_link
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jet-blocker-anti-ad-blocker-detector/public/partials/jetblocker-anti-ad-blocker-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/jet-blocker-anti-ad-blocker-detector/admin/partials/jetblocker-anti-ad-blocker-admin-display.php:22

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Contributors: The plugin contributors field is not present
The official readme.txt might help

jet-blocker-anti-ad-blocker-detector/jetblocker-anti-ad-blocker.php 69% from 13 tests

This is the main PHP file of "JetBlocker Anit AdBlocker Detector" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "5.2.4")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("jet-blocker-anti-ad-blocker-detector.php" instead of "jetblocker-anti-ad-blocker.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.4" instead of "4.9")

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
Success! There were no dangerous files found in this plugin797 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP12159638480
CSS35024267
JavaScript3158450

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity2.04
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods13.70%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
1 PNG file occupies 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png54.21KB29.20KB▼ 46.13%