84% detect-missing-adblocker

Code Review | Detect Missing Adblocker

WordPress plugin Detect Missing Adblocker scored84%from 54 tests.

About plugin

  • Plugin page: detect-missing-ad...
  • Plugin version: 1.1.9
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3.0
  • WordPress version: 6.3.1
  • First release: May 28, 2020
  • Latest release: Oct 2, 2023
  • Number of updates: 25
  • Update frequency: every 48.9 days
  • Top authors: fourtonfish (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /1,065 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.19ms] Passed 4 tests

An overview of server-side resources used by Detect Missing Adblocker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.52 ▼0.61
Dashboard /wp-admin3.33 ▼0.0248.63 ▼18.37
Posts /wp-admin/edit.php3.38 ▲0.0252.07 ▲1.06
Add New Post /wp-admin/post-new.php5.91 ▲0.02104.90 ▲4.54
Media Library /wp-admin/upload.php3.25 ▲0.0241.31 ▼2.82
Missing Ad-blocker /wp-admin/options-general.php?page=ftf-detect-missing-adblocker3.2636.48

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Detect Missing Adblocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,864 ▲10314.71 ▲0.362.72 ▲1.0441.39 ▼1.63
Dashboard /wp-admin2,199 ▲255.60 ▼0.0086.98 ▼7.5441.71 ▲0.76
Posts /wp-admin/edit.php2,110 ▲101.99 ▼0.0139.21 ▲0.6935.57 ▲3.11
Add New Post /wp-admin/post-new.php1,535 ▲923.80 ▲0.59742.49 ▲86.8468.21 ▲12.79
Media Library /wp-admin/upload.php1,401 ▲14.24 ▲0.01100.36 ▼8.9444.16 ▼4.83
Missing Ad-blocker /wp-admin/options-general.php?page=ftf-detect-missing-adblocker1,3355.39102.3652.51

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% 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 50% 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 take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/detect-missing-adblocker/ftf-detect-missing-adblocker.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: ads, adblock

detect-missing-adblocker/ftf-detect-missing-adblocker.php 92% from 13 tests

"Detect Missing Adblocker" version 1.1.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("detect-missing-adblocker.php" instead of "ftf-detect-missing-adblocker.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
There were no executable files found in this plugin7,640 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JSON2006,759
Markdown21260560
PHP1236187
JavaScript75192
Sass27340
CSS2002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
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
7 PNG files occupy 0.10MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png5.95KB2.77KB▼ 53.42%
assets/screenshot-1.png27.77KB15.77KB▼ 43.21%
assets/icon-256x256.png12.08KB4.85KB▼ 59.88%
assets/icon-400x400.png11.66KB7.72KB▼ 33.82%
assets/screenshot-2.png11.04KB6.73KB▼ 39.10%