79% adbutler

Code Review | AdButler WordPress Plugin

WordPress plugin AdButler WordPress Plugin scored79%from 54 tests.

About plugin

  • Plugin page: adbutler
  • Plugin version: 1.29
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 8, 2013
  • Latest release: Jun 30, 2023
  • Number of updates: 63
  • Update frequency: every 56.4 days
  • Top authors: sparklit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active /12,545 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼3.21ms] Passed 4 tests

Analyzing server-side resources used by AdButler WordPress Plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0746.21 ▲7.13
Dashboard /wp-admin3.35 ▲0.0050.08 ▼14.12
Posts /wp-admin/edit.php3.40 ▲0.0450.10 ▲0.63
Add New Post /wp-admin/post-new.php5.95 ▲0.0699.01 ▼1.99
Media Library /wp-admin/upload.php3.27 ▲0.0439.67 ▲2.64
Help /wp-admin/admin.php?page=adbutler_plugin_about3.2732.91
Settings /wp-admin/admin.php?page=adbutler_plugin3.4345.47

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_adbutler
widget_adbutler_hb
adbutler_interval_ads_restrict_to_pages
adbutler_interval_ads_start_nth_post
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
adbutler_interval_ads_restrict_to_home
...

Browser metrics Passed 4 tests

Checking browser requirements for AdButler WordPress Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲8814.42 ▼0.161.82 ▼0.0243.27 ▼8.64
Dashboard /wp-admin2,221 ▲415.70 ▼0.0092.26 ▼16.1682.32 ▲22.86
Posts /wp-admin/edit.php2,144 ▲442.25 ▲0.2637.98 ▲1.1536.60 ▼3.16
Add New Post /wp-admin/post-new.php6,265 ▲4,73926.25 ▲8.701,012.39 ▲383.1937.73 ▼9.69
Media Library /wp-admin/upload.php1,444 ▲474.32 ▲0.0898.67 ▼6.2287.15 ▲43.10
Help /wp-admin/admin.php?page=adbutler_plugin_about9851.8629.9248.00
Settings /wp-admin/admin.php?page=adbutler_plugin1,2761.8628.7039.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method adbutler_plugin::uninstall() should not be called statically
  • Zombie WordPress options detected upon uninstall: 10 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • adbutler_interval_ads_restrict_to_pages
    • widget_adbutler_hb
    • db_upgraded
    • widget_theysaidso_widget
    • adbutler_interval_ads_start_nth_post
    • adbutler_interval_ads_restrict_to_home
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid url: ""
  • Screenshots: Please a description for screenshot #2 in adbutler/assets to your readme.txt
You can look at the official readme.txt

adbutler/adbutler.php 92% from 13 tests

The principal PHP file in "AdButler WordPress Plugin" v. 1.29 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 155 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin547 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS1666287
JavaScript3268192
SVG10134
PHP161619
PO File10015

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.06
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%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
13 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/hero-check.png1.20KB0.36KB▼ 69.92%
images/icon-calendar.png1.61KB0.88KB▼ 45.21%
images/adbutler_icon_20.png0.77KB0.87KB0.00%
images/icon-targeting.png2.08KB1.32KB▼ 36.47%
images/help_step_2.png18.64KB8.98KB▼ 51.84%