83% social-button

Code Review | Social button

WordPress plugin Social button scored83%from 54 tests.

About plugin

  • Plugin page: social-button
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.12-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2016
  • Latest release: Sep 8, 2017
  • Number of updates: 10
  • Update frequency: every 38.1 days
  • Top authors: riponshah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,205 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▲2.00ms] Passed 4 tests

Server-side resources used by Social button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.71 ▲1.83
Dashboard /wp-admin3.31 ▲0.0154.99 ▲2.52
Posts /wp-admin/edit.php3.36 ▲0.0151.28 ▲3.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0199.78 ▲5.01
Media Library /wp-admin/upload.php3.24 ▲0.0137.53 ▲0.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Social button
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,901 ▲14013.66 ▼0.577.58 ▲5.6538.42 ▼12.77
Dashboard /wp-admin2,195 ▲155.62 ▼0.0196.09 ▲2.2445.95 ▲6.74
Posts /wp-admin/edit.php2,097 ▼31.95 ▼0.0435.07 ▼2.5034.75 ▼1.39
Add New Post /wp-admin/post-new.php1,526 ▼223.07 ▲0.13604.44 ▼75.1753.08 ▼8.11
Media Library /wp-admin/upload.php1,400 ▼34.23 ▲0.00102.38 ▼3.7943.56 ▼3.46

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-button/social-button.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Donate link: Invalid url: "None"
  • Plugin Name: You should set the name of your plugin on the first line ( === social-button === )
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

social-button/social-button.php Passed 13 tests

The principal PHP file in "Social button" v. 1.3 is loaded by WordPress automatically on each request
102 characters long description:
A plugin for social button. It is very usefull for showing your social profile on your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin139 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS140107
PHP1111430
JavaScript1202

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.10MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot/inwidget.png29.93KB10.86KB▼ 63.72%
screenshot/inpost.png76.08KB30.87KB▼ 59.43%