10% simple-follow-buttons

Code Review | Simple Follow Buttons

WordPress plugin Simple Follow Buttons scored 10% from 54 tests.

About plugin

  • Plugin page: simple-follow-but...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.4
  • WordPress version: 6.3.1
  • First release: Nov 11, 2015
  • Latest release: Nov 23, 2015
  • Number of updates: 11
  • Update frequency: every 1.1 days
  • Top authors: DavidoffNeal (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active / 3,690 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/simple-follow-buttons/inc/buttons.php+18
    Trying to access array offset on value of type null

Server metrics [RAM: ▼1.79MB] [CPU: ▼53.57ms] Passed 4 tests

An overview of server-side resources used by Simple Follow Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.20 ▼1.265.77 ▼41.79
Dashboard /wp-admin2.22 ▼1.0911.54 ▼44.17
Posts /wp-admin/edit.php2.22 ▼1.146.74 ▼40.65
Add New Post /wp-admin/post-new.php2.22 ▼3.677.75 ▼87.65
Media Library /wp-admin/upload.php2.22 ▼1.015.82 ▼31.13
Follow Buttons /wp-admin/options-general.php?page=simple-follow-buttons2.228.15

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 147 new files
Database: no new tables, 10 new options
New WordPress options
widget_sfb_widget
theysaidso_admin_options
sfb_buttons
sfb_version
widget_theysaidso_widget
sfb_settings
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Follow Buttons
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17014.05 ▼0.336.64 ▲5.0037.81 ▼8.91
Dashboard /wp-admin2,213 ▲254.87 ▼0.0299.02 ▼6.1537.38 ▼8.10
Posts /wp-admin/edit.php2,072 ▼172.01 ▼0.0136.44 ▼0.1938.31 ▲7.63
Add New Post /wp-admin/post-new.php1,523 ▲423.20 ▲0.08605.80 ▼25.4371.69 ▼7.29
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.0199.71 ▼8.5143.51 ▲0.11
Follow Buttons /wp-admin/options-general.php?page=simple-follow-buttons2,6104.2084.84161.28

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
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-follow-buttons/inc/widget.php+52
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 8 options
    • sfb_buttons
    • db_upgraded
    • widget_recent-posts
    • widget_sfb_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=simple-follow-buttons
    • > Deprecated in wp-content/plugins/simple-follow-buttons/inc/widget.php+52
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 6× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/simple-follow-buttons/inc/buttons.php
    • > /wp-content/plugins/simple-follow-buttons/inc/admin_bits.php
    • > /wp-content/plugins/simple-follow-buttons/inc/database.php
    • > /wp-content/plugins/simple-follow-buttons/inc/forms.php
    • > /wp-content/plugins/simple-follow-buttons/inc/styles.php
    • > /wp-content/plugins/simple-follow-buttons/inc/widget.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-follow-buttons/simple-follow-buttons.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: linkedin, facebook, pinterest, yummly, twitter...

simple-follow-buttons/simple-follow-buttons.php Passed 13 tests

This is the main PHP file of "Simple Follow Buttons" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
89 characters long description:
A simple plugin that enables you to add follow buttons to all of your posts and/or pages.

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
No dangerous file extensions were detected2,496 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PHP83636021,286
JavaScript772125641
CSS54049534
SVG10035

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.33
▷ Minimum class complexity3.00
▷ Maximum class complexity34.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions24
▷ Named functions24100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
121 PNG files occupy 0.44MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
buttons/plain/tumblr.png1.92KB1.92KB0.00%
buttons/arbenta/yummly.png6.08KB2.20KB▼ 63.92%
buttons/arbenta/print.png1.99KB2.01KB0.00%
buttons/metal/twitter.png4.37KB3.47KB▼ 20.53%
buttons/plain/reddit.png2.26KB2.27KB0.00%