78% sosh-icons

Code Review | webZunder Sharing Icons

WordPress plugin webZunder Sharing Icons scored 78% from 54 tests.

About plugin

  • Plugin page: sosh-icons
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9
  • WordPress version: 5.9.2
  • First release: Jul 10, 2014
  • Latest release: Feb 21, 2018
  • Number of updates: 40
  • Update frequency: every 33.1 days
  • Top authors: chriskloss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,370 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.18MB] [CPU: ▼308.00ms] Passed 4 tests

A check of server-side resources used by webZunder Sharing Icons
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1043.62 ▼9.60
Dashboard /wp-admin3.59 ▲0.1834.22 ▲0.44
Posts /wp-admin/edit.php3.81 ▲0.1737.31 ▼3.00
Add New Post /wp-admin/post-new.php5.81 ▼1.1662.76 ▼1,210.82
Media Library /wp-admin/upload.php3.47 ▲0.1723.60 ▼8.58
Sharing Icons /wp-admin/options-general.php?page=soshicons_settings3.4323.04

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 47 new files
Database: no new tables, 3 new options
New WordPress options
soshicons_options
soshicons_show_options
soshicons_version

Browser metrics Passed 4 tests

webZunder Sharing Icons: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲5315.90 ▲0.318.21 ▲1.602.60 ▲0.12
Dashboard /wp-admin2,897 ▲396.21 ▲0.01116.72 ▼16.94159.43 ▼6.63
Posts /wp-admin/edit.php2,696 ▲23.23 ▼0.1363.73 ▲2.20138.22 ▲1.21
Add New Post /wp-admin/post-new.php1,664 ▼716.40 ▼4.32436.15 ▼8.18153.01 ▲2.86
Media Library /wp-admin/upload.php1,703 ▲25.53 ▲0.02133.79 ▼7.78191.36 ▼1.73
Sharing Icons /wp-admin/options-general.php?page=soshicons_settings1,1662.3755.11147.55

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 2 options
    • soshicons_show_options
    • soshicons_version

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=soshicons_settings
    • > Notice in wp-content/plugins/sosh-icons/sosh_icons.php+79
    Undefined variable: active_tab
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=soshicons_settings
    • > Warning in wp-content/plugins/sosh-icons/sosh_icons.php+314
    Use of undefined constant ’ - assumed '’' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/sosh-icons/sosh_icons.php:31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Tags: Please reduce the number of tags, currently 36 tag instead of maximum 10
The official readme.txt is a good inspiration

sosh-icons/sosh_icons.php 92% from 13 tests

This is the main PHP file of "webZunder Sharing Icons" version 1.2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sosh-icons.php" instead of "sosh_icons.php")

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
There were no executable files found in this plugin6,633 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
CSS43142,092
Sass1430261,588
LESS1430361,578
SVG100655
PHP216140642
JavaScript11078

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
logo.png21.40KB8.54KB▼ 60.10%