90% bloglovin-button

Code Review | Bloglovin Button

WordPress plugin Bloglovin Button scored90%from 54 tests.

About plugin

  • Plugin page: bloglovin-button
  • Plugin version: 1.3.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2015
  • Latest release: Aug 10, 2023
  • Number of updates: 74
  • Update frequency: every 40.4 days
  • Top authors: pipdig (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /53,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.18ms] Passed 4 tests

An overview of server-side resources used by Bloglovin Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.16 ▼5.19
Dashboard /wp-admin3.31 ▲0.0145.53 ▼6.65
Posts /wp-admin/edit.php3.37 ▲0.0151.27 ▲3.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.20 ▼11.31
Media Library /wp-admin/upload.php3.24 ▲0.0139.99 ▲2.42

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
widget_bloglovin_button_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Bloglovin Button: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.031.78 ▲0.0643.36 ▲1.42
Dashboard /wp-admin2,198 ▲185.62 ▼0.1990.16 ▼2.0737.38 ▼7.18
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0433.10 ▼3.3735.30 ▼3.78
Add New Post /wp-admin/post-new.php1,526 ▼023.72 ▲0.05666.14 ▼25.9369.18 ▲9.36
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.04108.14 ▲6.5048.44 ▼2.33

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_bloglovin_button_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: bloglovin, followers, social, bloglovin widget, blog...

bloglovin-button/bloglovin-button.php Passed 13 tests

"Bloglovin Button" version 1.3.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
55 characters long description:
Easily add the Bloglovin Button to your WordPress blog.

Code Analysis Passed 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 detected140 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43433140

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 compressed PNG files occupy 0.01MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/button_with_count.png0.86KB0.88KB0.00%
img/bloglovin-button-full.png5.25KB4.36KB▼ 16.99%
img/button_no_count.png0.52KB0.54KB0.00%