84% simple-soc-widget

Code Review | Simple Social Widget

WordPress plugin Simple Social Widget scored 84% from 54 tests.

About plugin

  • Plugin page: simple-soc-widget
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 22, 2016
  • Latest release: Aug 19, 2020
  • Number of updates: 9
  • Update frequency: every 162.0 days
  • Top authors: Somonator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,525 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.87ms] Passed 4 tests

A check of server-side resources used by Simple Social Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.53 ▼2.52
Dashboard /wp-admin3.36 ▲0.0555.18 ▼15.62
Posts /wp-admin/edit.php3.41 ▲0.0550.75 ▼1.49
Add New Post /wp-admin/post-new.php5.94 ▲0.0599.08 ▲4.39
Media Library /wp-admin/upload.php3.28 ▲0.0538.73 ▲4.16

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Social Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▼013.70 ▲0.421.59 ▼0.1741.05 ▼2.47
Dashboard /wp-admin2,200 ▼64.89 ▼0.96129.12 ▲15.5445.02 ▲1.13
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0240.36 ▲2.1234.47 ▲0.13
Add New Post /wp-admin/post-new.php1,533 ▼923.13 ▲5.02751.18 ▲100.2569.77 ▲11.37
Media Library /wp-admin/upload.php1,391 ▲64.20 ▲0.01100.89 ▼3.7646.47 ▲2.84

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_simple_soc_link
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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: Class 'WP_Widget' not found in wp-content/plugins/simple-soc-widget/simple-soc-widget.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: widget, button, social

simple-soc-widget/simple-soc-widget.php 92% from 13 tests

"Simple Social Widget" version 1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin356 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1493142
PHP14526139
CSS23775

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity16.50
▷ Minimum class complexity4.00
▷ Maximum class complexity29.00
Average method complexity4.10
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
src/images/default.png2.16KB1.26KB▼ 41.61%
src/images/google.png17.49KB7.32KB▼ 58.13%