79% hb-line-button-tiny

Code Review | HB Line Button Tiny

WordPress plugin HB Line Button Tiny scored79%from 54 tests.

About plugin

  • Plugin page: hb-line-button-tiny
  • Plugin version: 0.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 18, 2022
  • Latest release: Jan 1, 2023
  • Number of updates: 5
  • Update frequency: every 27.2 days
  • Top authors: heiblack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /220 total downloads

Benchmarks

Plugin footprint 83% 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.34MB] [CPU: ▼12.44ms] Passed 4 tests

A check of server-side resources used by HB Line Button Tiny
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.405.22 ▼37.12
Dashboard /wp-admin3.33 ▲0.0251.12 ▼5.95
Posts /wp-admin/edit.php3.38 ▲0.0253.22 ▲1.44
Add New Post /wp-admin/post-new.php5.91 ▲0.0289.77 ▼8.14
Media Library /wp-admin/upload.php3.25 ▲0.0240.33 ▲1.95
HB Line Button /wp-admin/tools.php?page=hb_line_button_tiny3.2332.89

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for HB Line Button Tiny
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.26 ▼0.392.34 ▲0.6243.96 ▲4.47
Dashboard /wp-admin2,202 ▲255.57 ▼0.0585.50 ▼10.9839.26 ▼5.19
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0540.18 ▲1.9435.46 ▼3.14
Add New Post /wp-admin/post-new.php1,529 ▲322.98 ▼0.06679.71 ▼42.3351.77 ▼7.67
Media Library /wp-admin/upload.php1,404 ▲104.19 ▼0.0596.87 ▼13.7548.05 ▼0.28
HB Line Button /wp-admin/tools.php?page=hb_line_button_tiny8882.0223.8427.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=hb_line_button_tiny
    • > Notice in wp-content/plugins/hb-line-button-tiny/page/hb_line_button_tiny_setting.php+7
    Undefined index: line
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/tools.php?page=hb_line_button_tiny
    • > Notice in wp-content/plugins/hb-line-button-tiny/page/hb_line_button_tiny_setting.php+29
    Trying to access array offset on value of type null

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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/hb-line-button-tiny/page/hb_line_button_tiny_button.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: line

hb-line-button-tiny/hb-line-button-tiny.php Passed 13 tests

"HB Line Button Tiny" version 0.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
21 characters long description:
A HB Line Button Tiny

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
Good job! No executable or dangerous file extensions detected380 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP32111231
CSS1241126
JavaScript21122
XML1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods116.67%
▷ Protected methods00.00%
▷ Private methods583.33%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants0
▷ Global constants00.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
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
assets/btn_base.png1.36KB0.91KB▼ 32.76%