88% wp-sns-share-buttons

Code Review | WP SNS Share Buttons

WordPress plugin WP SNS Share Buttons scored 88% from 53 tests.

About plugin

  • Plugin page: wp-sns-share-buttons
  • Plugin version: 0.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.5
  • WordPress version: 5.8.1
  • First release: Mar 27, 2018
  • Latest release: Apr 27, 2018
  • Number of updates: 9
  • Update frequency: every 3.3 days
  • Top authors: ejointjp (100%)

Code review

53 tests

User reviews

1 review

Install metrics

20+ active / 562 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.06MB] [CPU: ▼292.38ms] Passed 4 tests

Server-side resources used by WP SNS Share Buttons
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.83 ▲0.1125.20 ▲3.49
Dashboard /wp-admin3.24 ▲0.1944.64 ▲1.89
Posts /wp-admin/edit.php3.29 ▲0.1940.57 ▲0.05
Add New Post /wp-admin/post-new.php4.77 ▼0.6555.20 ▼1,166.95
Media Library /wp-admin/upload.php3.12 ▲0.1230.72 ▼4.50
WP SNS Share Buttons /wp-admin/options-general.php?page=wpssb-setting3.0725.49

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WP SNS Share Buttons
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,680 ▲9815.81 ▲0.268.91 ▲1.9349.90 ▲3.52
Dashboard /wp-admin2,935 ▲855.92 ▲0.15132.77 ▼5.97108.70 ▲15.41
Posts /wp-admin/edit.php2,708 ▲22.69 ▼0.0062.99 ▼1.0095.57 ▼4.94
Add New Post /wp-admin/post-new.php1,856 ▲20319.08 ▲0.22357.23 ▼16.39106.67 ▲3.68
Media Library /wp-admin/upload.php1,774 ▲25.12 ▲0.12154.48 ▲3.28112.53 ▼6.09
WP SNS Share Buttons /wp-admin/options-general.php?page=wpssb-setting1,2442.2155.3176.45

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

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
These errors were triggered by the plugin
  • 15 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpssb-setting
    • > Notice in wp-content/plugins/wp-sns-share-buttons/wp-sns-share-buttons.php+333
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Sns_Share_Buttons_Buttons' not found in wp-content/plugins/wp-sns-share-buttons/template/wpssb-template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/wp-sns-share-buttons/wp-sns-share-buttons.php:68
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_file_data() in wp-content/plugins/wp-sns-share-buttons/wp-sns-share-buttons.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

wp-sns-share-buttons/wp-sns-share-buttons.php Passed 13 tests

Analyzing the main PHP file in "WP SNS Share Buttons" version 0.1.8
66 characters long description:
A WordPress plugin that makes SNS Share and Follow Buttons easily.

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
No dangerous file extensions were detected748 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP1315432663
PO File1314284
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.73
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity1.61
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes19.09%
▷ Concrete classes1090.91%
▷ Final classes00.00%
Methods69
▷ Static methods00.00%
▷ Public methods5884.06%
▷ Protected methods710.14%
▷ Private methods45.80%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin