84% simple-share-follow-button

Code Review | Simple Share Follow Button

WordPress plugin Simple Share Follow Button scored84%from 54 tests.

About plugin

  • Plugin page: simple-share-foll...
  • Plugin version: 1.05
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Nov 12, 2021
  • Latest release: Nov 1, 2023
  • Number of updates: 17
  • Update frequency: every 42.3 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /970 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.07MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by Simple Share Follow Button
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.55 ▲0.34
Dashboard /wp-admin3.39 ▲0.0446.47 ▼15.66
Posts /wp-admin/edit.php3.44 ▲0.0849.28 ▲4.23
Add New Post /wp-admin/post-new.php5.98 ▲0.0896.07 ▼0.42
Media Library /wp-admin/upload.php3.31 ▲0.0836.83 ▲3.92
Simple Share Follow Button /wp-admin/options-general.php?page=simplesharefollowbutton3.3037.30

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
ssfbf
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Simple Share Follow Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▲0.011.64 ▲0.1042.33 ▲3.65
Dashboard /wp-admin2,199 ▲225.61 ▼0.0492.89 ▼3.2141.32 ▲0.86
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0240.22 ▲3.3536.45 ▲5.25
Add New Post /wp-admin/post-new.php1,540 ▲1218.25 ▼4.75591.54 ▼89.0268.57 ▲6.32
Media Library /wp-admin/upload.php1,407 ▲44.20 ▲0.0099.16 ▼2.0842.11 ▼9.03
Simple Share Follow Button /wp-admin/options-general.php?page=simplesharefollowbutton1,3308.37219.3137.02

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
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • ssfbf
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-share-follow-button/lib/class-simplesharefollowbutton.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-share-follow-button/lib/class-simplesharefollowbuttonadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-share-follow-button/lib/class-simplesharefollowbutton.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 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
2 plugin tags: share, follow

simple-share-follow-button/simplesharefollowbutton.php 92% from 13 tests

"Simple Share Follow Button" version 1.05's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-share-follow-button.php" instead of "simplesharefollowbutton.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin726 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP563164337
JavaScript3183187
CSS3122136
Sass10025
SVG10021
JSON10020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity25.00
▷ Minimum class complexity14.00
▷ Maximum class complexity36.00
Average method complexity4.20
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods1493.33%
▷ Protected methods00.00%
▷ Private methods16.67%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin