84% soundst-social-buttons

Code Review | Soundst Social Buttons

WordPress plugin Soundst Social Buttons scored84%from 54 tests.

About plugin

  • Plugin page: soundst-social-bu...
  • Plugin version: 0.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 29, 2014
  • Latest release: Feb 8, 2018
  • Number of updates: 10
  • Update frequency: every 141.2 days
  • Top authors: SoundStrategies (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /758 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼9.69ms] Passed 4 tests

Server-side resources used by Soundst Social Buttons
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.78 ▼0.05
Dashboard /wp-admin3.31 ▼0.0345.11 ▼16.52
Posts /wp-admin/edit.php3.36 ▲0.0144.82 ▼0.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0181.25 ▼16.51
Media Library /wp-admin/upload.php3.23 ▲0.0131.80 ▼5.05
Soundst Social Buttons /wp-admin/options-general.php?page=soundst-sb-options3.2030.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Soundst Social Buttons
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▼0.011.68 ▼0.1839.53 ▼0.29
Dashboard /wp-admin2,196 ▲185.53 ▼0.1181.58 ▼15.6038.28 ▲0.53
Posts /wp-admin/edit.php2,101 ▲41.97 ▼0.0338.86 ▲4.5335.54 ▼0.38
Add New Post /wp-admin/post-new.php1,529 ▲323.23 ▲0.04648.14 ▲7.8350.95 ▼0.36
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.1891.76 ▼6.3343.77 ▲0.43
Soundst Social Buttons /wp-admin/options-general.php?page=soundst-sb-options9602.0322.6124.34

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/soundst-social-buttons/soundst-fb-button.php:27

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Invalid url: "None"
You can look at the official readme.txt

soundst-social-buttons/soundst-fb-button.php 92% from 13 tests

"Soundst Social Buttons" version 0.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("soundst-social-buttons.php" instead of "soundst-fb-button.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
There were no executable files found in this plugin176 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1218176

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity52.00
▷ Minimum class complexity52.00
▷ Maximum class complexity52.00
Average method complexity9.50
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ss_tw_share.png5.56KB2.95KB▼ 46.89%
ss_fb_share.png6.44KB3.15KB▼ 51.11%