84% clarity-ad-blocker

Code Review | Clarity - Ad blocker for WordPress

WordPress plugin Clarity - Ad blocker for WordPress scored84%from 54 tests.

About plugin

  • Plugin page: clarity-ad-blocker
  • Plugin version: 1.3.231102
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 15, 2021
  • Latest release: Nov 2, 2023
  • Number of updates: 38
  • Update frequency: every 26.2 days
  • Top authors: khromov (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

2,000+ active /11,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.85ms] Passed 4 tests

Analyzing server-side resources used by Clarity - Ad blocker for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0333.35 ▼3.86
Dashboard /wp-admin3.34 ▼0.0140.71 ▼20.02
Posts /wp-admin/edit.php3.39 ▲0.0347.37 ▲2.56
Add New Post /wp-admin/post-new.php5.92 ▲0.0378.37 ▼10.07
Media Library /wp-admin/upload.php3.26 ▲0.0338.74 ▲6.33

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Clarity - Ad blocker for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.39 ▼0.171.60 ▼0.2437.82 ▼8.21
Dashboard /wp-admin2,200 ▲235.61 ▼0.0493.68 ▼5.3244.42 ▼0.46
Posts /wp-admin/edit.php2,105 ▲52.02 ▲0.0640.09 ▲2.9337.94 ▲6.13
Add New Post /wp-admin/post-new.php1,543 ▲1723.19 ▼0.39657.53 ▼12.7056.05 ▲1.96
Media Library /wp-admin/upload.php1,405 ▲24.14 ▼0.0796.20 ▼7.1741.65 ▼2.72

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/clarity-ad-blocker/clarity-ad-blocker.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
3 plugin tags: ads, notifications, adblock

clarity-ad-blocker/clarity-ad-blocker.php 92% from 13 tests

"Clarity - Ad blocker for WordPress" version 1.3.231102's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Domain Path: The domain path folder was not found ("/languages/")

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
There were no executable files found in this plugin90 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2165675
Markdown18015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants4
▷ Global constants4100.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
No PNG images were found in this plugin