78% pro-adblock

Code Review | Pro-AdBlock

WordPress plugin Pro-AdBlock scored78%from 54 tests.

About plugin

  • Plugin page: pro-adblock
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.6
  • WordPress version: 6.3.1
  • First release: Nov 2, 2015
  • Latest release: May 18, 2018
  • Number of updates: 14
  • Update frequency: every 66.3 days
  • Top authors: sergej_k (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,344 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: ▼7.10ms] Passed 4 tests

A check of server-side resources used by Pro-AdBlock
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0731.79 ▼7.51
Dashboard /wp-admin3.32 ▲0.0248.83 ▼1.77
Posts /wp-admin/edit.php3.37 ▲0.0248.82 ▼3.07
Add New Post /wp-admin/post-new.php5.90 ▲0.0291.97 ▼14.95
Media Library /wp-admin/upload.php3.24 ▲0.0235.09 ▼2.88
Pro-AdBlock /wp-admin/options-general.php?page=pro-adblock-options3.1933.03

Server storage [IO: ▲0.80MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Pro-AdBlock: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲18313.43 ▼1.1310.05 ▲8.5240.99 ▼0.67
Dashboard /wp-admin2,199 ▲195.57 ▼0.0489.06 ▲1.3841.60 ▼5.19
Posts /wp-admin/edit.php2,104 ▲71.99 ▲0.0238.92 ▲0.5037.62 ▼1.92
Add New Post /wp-admin/post-new.php1,532 ▲423.37 ▲0.17616.89 ▼36.7153.82 ▲3.87
Media Library /wp-admin/upload.php1,404 ▲74.12 ▼0.08102.76 ▲0.1543.81 ▼2.93
Pro-AdBlock /wp-admin/options-general.php?page=pro-adblock-options8942.0123.9531.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=pro-adblock-options
    • > Warning in wp-content/plugins/pro-adblock/pro-adblock.php+290
    array_key_exists() expects parameter 2 to be array, bool given

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/pro-adblock/pro-adblock.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Overlay on frontpage), #2 (Plugin options page)
Please take inspiration from this readme.txt

pro-adblock/pro-adblock.php Passed 13 tests

The primary PHP file in "Pro-AdBlock" version 2.0.0 is used by WordPress to initiate all plugin functionality
58 characters long description:
Displays an overlay to users when no adblocker is enabled.

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
Everything looks great! No dangerous files found in this plugin371 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP246101149
PO File12222122
CSS111982
JavaScript121418

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.76MB with 0.43MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png60.37KB34.19KB▼ 43.36%
screenshot-1.png713.07KB218.73KB▼ 69.32%