90% simple-adblock-notice

Code Review | Simple Adblock Notice

WordPress plugin Simple Adblock Notice scored90%from 54 tests.

About plugin

  • Plugin page: simple-adblock-no...
  • Plugin version: 2.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.8.2
  • WordPress version: 6.3.1
  • First release: May 9, 2015
  • Latest release: Nov 16, 2021
  • Number of updates: 39
  • Update frequency: every 61.6 days
  • Top authors: shrinitech (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

100+ active /21,823 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Simple Adblock Notice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0641.39 ▼1.85
Dashboard /wp-admin3.37 ▲0.0244.58 ▼15.07
Posts /wp-admin/edit.php3.48 ▲0.1246.19 ▲1.29
Add New Post /wp-admin/post-new.php5.94 ▲0.0581.81 ▼28.06
Media Library /wp-admin/upload.php3.29 ▲0.0638.06 ▲6.00
Simple Adblock Notice /wp-admin/options-general.php?page=simple-adblock-notice-settings3.2529.82

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

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

Browser metrics Passed 4 tests

Simple Adblock Notice: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲15613.67 ▼0.616.88 ▲4.8945.49 ▼5.00
Dashboard /wp-admin2,212 ▲245.87 ▲0.99111.02 ▲4.0839.79 ▲3.32
Posts /wp-admin/edit.php2,098 ▲62.06 ▲0.0338.76 ▼5.1637.10 ▲0.61
Add New Post /wp-admin/post-new.php1,539 ▼321.15 ▲2.71731.40 ▲118.3263.74 ▲0.04
Media Library /wp-admin/upload.php1,394 ▲34.18 ▼0.03106.73 ▲4.8947.46 ▲2.95
Simple Adblock Notice /wp-admin/options-general.php?page=simple-adblock-notice-settings1,0732.0627.0133.22

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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: anti adblock, adblock plus notice, adblock plus detect, anti adblock plus, advertisement...

simple-adblock-notice/simple-adblock-notice.php Passed 13 tests

The main PHP script in "Simple Adblock Notice" version 2.4.0 is automatically included on every request by WordPress
116 characters long description:
Simple Adblock Notice plugin shows a popup to whitelist your website if Adblock plus browser extension is installed.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected784 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP311440344
CSS32818339
SVG10097
JavaScript2004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity5.50
▷ Minimum class complexity3.00
▷ Maximum class complexity8.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/close.png1.18KB0.27KB▼ 76.83%