68% bd-buttons

Code Review | BD Buttons

WordPress plugin BD Buttons scored68%from 54 tests.

About plugin

  • Plugin page: bd-buttons
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.4.1
  • WordPress version: 6.3.1
  • First release: May 20, 2021
  • Latest release: Nov 24, 2023
  • Number of updates: 6
  • Update frequency: every 153.0 days
  • Top authors: BearlyDoug (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /453 total downloads


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
Installer ran successfully

Server metrics [RAM: ▼0.17MB] [CPU: ▼8.56ms] Passed 4 tests

Server-side resources used by BD Buttons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1145.07 ▲3.26
Dashboard /wp-admin3.42 ▲0.1147.35 ▼3.35
Posts /wp-admin/edit.php3.47 ▲0.1148.74 ▼0.40
Add New Post /wp-admin/post-new.php4.91 ▼0.9962.48 ▼29.76
Media Library /wp-admin/upload.php3.34 ▲0.1134.04 ▼0.74
BD Buttons /wp-admin/admin.php?page=bdbuttons3.3143.95
BD Plugins /wp-admin/admin.php?page=bearlydoug3.3233.11

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 26 new files
Database: 1 new table, 6 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

BD Buttons: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6814.33 ▼0.101.61 ▼0.2437.09 ▼7.90
Dashboard /wp-admin2,231 ▲575.61 ▼0.0195.35 ▼5.4581.29 ▲37.95
Posts /wp-admin/edit.php2,139 ▲392.16 ▲0.1540.97 ▼1.7136.08 ▲2.27
Add New Post /wp-admin/post-new.php1,561 ▲2623.39 ▼2.08694.68 ▲76.7365.42 ▼4.35
Media Library /wp-admin/upload.php1,456 ▲624.22 ▲0.0399.79 ▲1.2780.84 ▲37.61
BD Buttons /wp-admin/admin.php?page=bdbuttons1,3082.3436.9649.75
BD Plugins /wp-admin/admin.php?page=bearlydoug1,4222.0529.1439.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_bdButtons
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
  • 4× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bd-buttons/includes/index.php
    • > /wp-content/plugins/bd-buttons/bdButtons/index.php
    • > /wp-content/plugins/bd-buttons/images/index.php
    • > /wp-content/plugins/bd-buttons/bdButtons.php
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bd-buttons/functions-bd.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/bd-buttons/includes/BDPluginsNews.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: link buttons, links, button link, stylize links

bd-buttons/bdButtons.php 77% from 13 tests

The main PHP file in "BD Buttons" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 223 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bd-buttons.php" instead of "bdButtons.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,264 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions15100.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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
6 PNG files occupy 0.24MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png0.96KB0.69KB▼ 27.68%
images/gutenborg.png161.82KB51.46KB▼ 68.20%
images/spacer.png0.27KB0.09KB▼ 64.60%