84% sorry-adblocker

Code Review | Sorry AdBlocker

WordPress plugin Sorry AdBlocker scored84%from 54 tests.

About plugin

  • Plugin page: sorry-adblocker
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Nov 1, 2015
  • Latest release: Nov 1, 2015
  • Number of updates: 7
  • Update frequency: every 1.6 days
  • Top authors: Ukyo.will (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,966 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.11MB] [CPU: ▼13.92ms] Passed 4 tests

Analyzing server-side resources used by Sorry AdBlocker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.58 ▲2.27
Dashboard /wp-admin3.34 ▼0.0144.00 ▼18.76
Posts /wp-admin/edit.php3.39 ▲0.0354.84 ▼2.06
Add New Post /wp-admin/post-new.php5.40 ▼0.4970.14 ▼37.11
Media Library /wp-admin/upload.php3.26 ▲0.0339.29 ▲3.89

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
mssg
widget_theysaidso_widget
ttle
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Sorry AdBlocker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,952 ▲18113.44 ▼0.8512.34 ▲10.6636.67 ▼4.46
Dashboard /wp-admin2,211 ▲345.62 ▼0.0494.17 ▲3.2042.97 ▲0.18
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0233.88 ▼7.2532.94 ▼5.50
Add New Post /wp-admin/post-new.php1,539 ▲1323.08 ▲0.13674.33 ▲45.5954.04 ▼1.80
Media Library /wp-admin/upload.php1,419 ▲224.20 ▼0.0197.75 ▼7.7644.50 ▼1.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • ttle
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • mssg
    • widget_recent-comments

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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 2× 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/sorry-adblocker/trunk/sorry-adblocker.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sorry-adblocker/sorry-adblocker.php:13

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

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
  • Tags: Please delete some tags, you are using 26 tag instead of maximum 10
You can take inspiration from this readme.txt

sorry-adblocker/sorry-adblocker.php Passed 13 tests

"Sorry AdBlocker" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
27 characters long description:
Restrict AdBlocker's views.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin550 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP24624268
JavaScript13422253
PO File18029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.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
PNG images were not found in this plugin