74% tnk-sns-share-link-buttons

Code Review | TNK SNS share link buttons

WordPress plugin TNK SNS share link buttons scored74%from 54 tests.

About plugin

  • Plugin page: tnk-sns-share-lin...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.1
  • WordPress version: 6.3.1
  • First release: Feb 23, 2015
  • Latest release: Feb 23, 2015
  • Number of updates: 6
  • Update frequency: every 3.3 days
  • Top authors: TNK Software (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /982 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by TNK SNS share link buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0728.11 ▼12.47
Dashboard /wp-admin3.32 ▲0.0145.54 ▼4.95
Posts /wp-admin/edit.php3.37 ▲0.0147.31 ▼3.69
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.05 ▼4.35
Media Library /wp-admin/upload.php3.24 ▲0.0135.11 ▲4.93
TNK SNS links /wp-admin/plugins.php?page=tnk-sns-share-link-buttons/tnksnslink.php3.2030.60

Server storage [IO: ▲0.05MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by TNK SNS share link buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.58 ▼0.841.76 ▼0.1139.16 ▼0.23
Dashboard /wp-admin2,216 ▲254.87 ▼0.01113.12 ▲2.6143.65 ▼0.92
Posts /wp-admin/edit.php2,099 ▲71.99 ▼0.0539.00 ▼2.0435.14 ▼4.50
Add New Post /wp-admin/post-new.php1,367 ▼16119.46 ▼3.82530.23 ▼159.4139.71 ▼13.66
Media Library /wp-admin/upload.php1,386 ▼54.18 ▼0.0296.02 ▼1.4340.64 ▼3.08
TNK SNS links /wp-admin/plugins.php?page=tnk-sns-share-link-buttons/tnksnslink.php9242.0624.2325.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method tnksnsplugin::uninstall() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% 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 50% 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_uninstall_hook() in wp-content/plugins/tnk-sns-share-link-buttons/tnksnslink.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Screenshots: Please add images for these screenshots: #1 (Support services), #2 (setting page)
You can look at the official readme.txt

tnk-sns-share-link-buttons/tnksnslink.php 92% from 13 tests

The entry point to "TNK SNS share link buttons" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("tnk-sns-share-link-buttons.php" instead of "tnksnslink.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin243 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32617196
JavaScript12047

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
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
20 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/en.png0.71KB0.72KB0.00%
icons/pk.png0.60KB0.60KB0.00%
icons/tw.png0.63KB0.62KB▼ 1.40%
icons/pi.png0.54KB0.52KB▼ 2.72%
icons/gb.png0.81KB0.81KB0.12%