84% simple-social-media-buttons

Code Review | Plugin Simple Social Media Buttons

WordPress plugin Plugin Simple Social Media Buttons scored 84% from 54 tests.

About plugin

  • Plugin page: simple-social-med...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.3
  • WordPress version: 6.3.1
  • First release: Dec 20, 2020
  • Latest release: Mar 30, 2021
  • Number of updates: 3
  • Update frequency: every 37.0 days
  • Top authors: bugtoo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 364 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Plugin Simple Social Media Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0745.82 ▲0.91
Dashboard /wp-admin3.37 ▲0.0645.05 ▼6.03
Posts /wp-admin/edit.php3.42 ▲0.0644.48 ▼2.61
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.80 ▼7.42
Media Library /wp-admin/upload.php3.29 ▲0.0632.25 ▲1.42

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Plugin Simple Social Media Buttons
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.17 ▼1.261.45 ▼0.5940.30 ▼8.07
Dashboard /wp-admin2,208 ▲205.81 ▼0.03105.78 ▼13.8538.77 ▼7.49
Posts /wp-admin/edit.php2,088 ▼12.03 ▲0.0138.02 ▲2.2533.24 ▼1.27
Add New Post /wp-admin/post-new.php1,530 ▼723.28 ▲4.68611.81 ▼43.7952.66 ▼11.43
Media Library /wp-admin/upload.php1,390 ▲24.22 ▼0.0297.02 ▲1.0041.53 ▼0.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_simple_social_media_buttons
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-social-media-buttons/simple-social-media-buttons.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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: Add images for these screenshots: #1 (Widget control panel with General Settings expanded), #2 (Sidebar with icons square with round border), #3 (Sidebar with icons round)
The official readme.txt might help

simple-social-media-buttons/simple-social-media-buttons.php Passed 13 tests

The main PHP script in "Plugin Simple Social Media Buttons" version 1.0 is automatically included on every request by WordPress
72 characters long description:
Adds a widget for sharing social media in a simple and easy to configure

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
Success! There were no dangerous files found in this plugin9,822 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP12918210
CSS214652
JavaScript10114

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity7.33
▷ Minimum method complexity1.00
▷ Maximum method complexity18.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%
Functions1
▷ Named functions1100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png44.31KB13.46KB▼ 69.64%
assets/screenshot-3.png5.82KB2.80KB▼ 51.97%
assets/screenshot-2.png3.49KB2.00KB▼ 42.90%