61% blog-floating-button

Code Review | Blog Floating Button

WordPress plugin Blog Floating Button scored61%from 54 tests.

About plugin

  • Plugin page: blog-floating-button
  • Plugin version: 1.4.14
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 14, 2020
  • Latest release: Nov 9, 2023
  • Number of updates: 25
  • Update frequency: every 52.2 days
  • Top authors: 1meril (100%)

Code review

54 tests

User reviews

1 review

Install metrics

9,000+ active /38,322 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.20MB] [CPU: ▲2,842.67ms] 50% from 4 tests

A check of server-side resources used by Blog Floating Button
It is recommended to improve the following
  • CPU: Total CPU usage must kept under 500.00ms (currently 3,820.70ms on /wp-admin/admin.php?page=blog-floating-button-report)
  • Extra CPU: The extra CPU usage should be kept under 200.00ms (currently 2,842.67ms on /wp-admin/admin.php?page=blog-floating-button-report)
PageMemory (MB)CPU Time (ms)
Home /5.18 ▲1.71121.32 ▲81.52
Dashboard /wp-admin4.55 ▲1.203,803.34 ▲3,739.31
Posts /wp-admin/edit.php4.60 ▲1.245,121.06 ▲5,073.91
Add New Post /wp-admin/post-new.php7.09 ▲1.203,879.38 ▲3,783.21
Media Library /wp-admin/upload.php4.41 ▲1.173,801.47 ▲3,766.63
設定 /wp-admin/admin.php?page=blog-floating-button4.656,851.78
解析レポート /wp-admin/admin.php?page=blog-floating-button-report4.413,820.70

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 58 new files
Database: 3 new tables, 9 new options
New tables
wp_bfb_access_log
wp_bfb_optimizemeta
wp_bfb_click_log
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
bfb_access_db_version
bfb_optimize_db_version
bfb_click_db_version
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Blog Floating Button
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,970 ▲22313.78 ▼0.5710.81 ▲9.0536.17 ▼10.48
Dashboard /wp-admin2,243 ▲695.15 ▼0.5188.37 ▼12.4747.38 ▲3.64
Posts /wp-admin/edit.php2,151 ▲512.46 ▲0.5135.77 ▼0.1640.09 ▲4.67
Add New Post /wp-admin/post-new.php1,579 ▲4325.38 ▲2.22619.92 ▼61.0969.73 ▲14.17
Media Library /wp-admin/upload.php1,454 ▲604.41 ▲0.24100.07 ▲0.8450.27 ▲5.94
設定 /wp-admin/admin.php?page=blog-floating-button3,1584.2064.83277.61
解析レポート /wp-admin/admin.php?page=blog-floating-button-report1,1963.34120.5383.73

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_bfb_optimizemeta
    • wp_bfb_click_log
    • wp_bfb_access_log
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • bfb_optimize_db_version
    • db_upgraded
    • bfb_click_db_version
    • bfb_access_db_version
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/blog-floating-button/inc/setting-help.php
    • > /wp-content/plugins/blog-floating-button/inc/optimize/report/report-graph.php
  • 68× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/blog-floating-button/inc/optimize/optimize-subBtn.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/blog-floating-button/inc/setting-sp/setting-sp-textBtn.php:2
    • > PHP Notice
      Undefined variable: start_date in wp-content/plugins/blog-floating-button/inc/report/report-detail-access.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/blog-floating-button/inc/report/report-main.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/blog-floating-button/inc/setting-common.php:12
    • > PHP Notice
      Undefined variable: optData in wp-content/plugins/blog-floating-button/inc/optimize/report/report-graph.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'BlogFloatingButton' not found in wp-content/plugins/blog-floating-button/optimize.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/blog-floating-button/inc/report/report-monthly.php:4
    • > PHP Notice
      Undefined variable: end_date in wp-content/plugins/blog-floating-button/inc/report/report-detail-access.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/blog-floating-button/inc/setting-sp/setting-sp-imgBanner.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=blog-floating-button
    • > Network (severe)
    wp-content/plugins/blog-floating-button/css/images/ui-bg_glass_65_ffffff_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=blog-floating-button
    • > Network (severe)
    wp-content/plugins/blog-floating-button/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
  • Tested up to: Version not formatted correctly
You can look at the official readme.txt

blog-floating-button/blog-floating-button.php Passed 13 tests

The entry point to "Blog Floating Button" version 1.4.14 is a PHP file that has certain tags in its header comment area
121 characters long description:
「Blog Floating Button(BFB)」はブログ内にフロートボタンを簡単に実装できるプラグインです。

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected12,683 lines of code in 53 files:
LanguageFilesBlank linesComment linesLines of code
PHP391,7076019,921
CSS342651,587
Markdown11250535
JavaScript67251354
Sass2435257
JSON10028
SVG1001

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity142.67
▷ Minimum class complexity1.00
▷ Maximum class complexity445.00
Average method complexity5.55
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods280
▷ Static methods31.07%
▷ Public methods7827.86%
▷ Protected methods18967.50%
▷ Private methods134.64%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/check_false.png1.14KB0.79KB▼ 30.51%
images/closed.png0.43KB0.26KB▼ 40.32%
images/closed_2.png0.65KB0.65KB▼ 0.60%
images/check_true.png0.79KB0.59KB▼ 25.59%