68% wordpress-adblock-blocker

Code Review | WordPress Adblock Blocker

WordPress plugin WordPress Adblock Blocker scored68%from 54 tests.

About plugin

  • Plugin page: wordpress-adblock...
  • Plugin version: 2017.08.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8.0
  • WordPress version: 6.3.1
  • First release: Aug 23, 2010
  • Latest release: Jul 13, 2017
  • Number of updates: 18
  • Update frequency: every 140.4 days
  • Top authors: christopherross (83.33%)horshipsrectors (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,373 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼35.42ms] Passed 4 tests

A check of server-side resources used by WordPress Adblock Blocker
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0628.56 ▼12.29
Dashboard /wp-admin3.00 ▼0.3025.10 ▼34.67
Posts /wp-admin/edit.php3.01 ▼0.3524.63 ▼22.15
Add New Post /wp-admin/post-new.php3.00 ▼2.8824.58 ▼70.50
Media Library /wp-admin/upload.php3.00 ▼0.2223.86 ▼14.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Adblock Blocker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,480 ▼27714.69 ▲0.080.92 ▼1.0316.80 ▼28.69
Dashboard /wp-admin2,210 ▲225.90 ▲0.01104.76 ▼9.3841.81 ▼3.00
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0635.33 ▼8.0033.57 ▼0.27
Add New Post /wp-admin/post-new.php1,536 ▲2223.29 ▲5.82662.23 ▼42.6471.17 ▲15.11
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0196.22 ▼13.8544.98 ▼4.16
AdBlock Blocker /wp-admin/horshipsrectors_wordpress_ad_blocker.php260.440.1213.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wordpress-adblock-blocker/common/cr-common.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wordpress-adblock-blocker/wordpress-adblock-blocker.php:33

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/horshipsrectors_wordpress_ad_blocker.php
    • > Network (severe)
    wp-admin/horshipsrectors_wordpress_ad_blocker.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

wordpress-adblock-blocker/wordpress-adblock-blocker.php Passed 13 tests

The entry point to "WordPress Adblock Blocker" version 2017.08.13 is a PHP file that has certain tags in its header comment area
93 characters long description:
A plugin which redirects subscriber level users back to the homepage after they've logged in.

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 detected335 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP326479289
CSS111038
JavaScript2328

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions17
▷ Named functions17100.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
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
common/wp-admin-heading.png0.77KB0.39KB▼ 48.98%