84% social-icons-obvs

Code Review | Social Icons Obvs

WordPress plugin Social Icons Obvs scored84%from 54 tests.

About plugin

  • Plugin page: social-icons-obvs
  • Plugin version: 1.1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 6.3.1
  • First release: Mar 21, 2017
  • Latest release: Feb 3, 2021
  • Number of updates: 46
  • Update frequency: every 30.7 days
  • Top authors: jasewarner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,249 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
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼3.59ms] Passed 4 tests

This is a short check of server-side resources used by Social Icons Obvs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1642.59 ▼1.21
Dashboard /wp-admin3.50 ▲0.2051.06 ▼2.43
Posts /wp-admin/edit.php3.61 ▲0.2657.02 ▲9.66
Add New Post /wp-admin/post-new.php6.08 ▲0.1989.66 ▼6.40
Media Library /wp-admin/upload.php3.42 ▲0.1938.03 ▼4.32
Social Icons Obvs /wp-admin/options-general.php?page=social-icons-obvs-settings3.4036.56

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

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

Browser metrics Passed 4 tests

Social Icons Obvs: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.31 ▼0.911.66 ▼0.4843.88 ▼1.66
Dashboard /wp-admin2,210 ▲285.85 ▼0.00106.90 ▲2.0238.86 ▼6.66
Posts /wp-admin/edit.php2,096 ▲71.96 ▼0.0540.13 ▲3.1533.96 ▼2.45
Add New Post /wp-admin/post-new.php1,536 ▲323.39 ▲0.28658.38 ▼39.8449.69 ▼6.65
Media Library /wp-admin/upload.php1,395 ▲104.18 ▼0.0396.42 ▼8.9645.08 ▲1.37
Social Icons Obvs /wp-admin/options-general.php?page=social-icons-obvs-settings2,5402.2653.0434.68

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-section-customise.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-icons-obvs/public/partials/social-icons-obvs-public-display.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-section-display.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-field-select.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-field-text.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-field-checkbox-text.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-page-settings.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-field-select-text.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-section-accounts.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-icons-obvs/admin/partials/social-icons-obvs-admin-section-customise-preview.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === social-icons-obvs === )
  • Tags: You are using too many tags: 24 tag instead of maximum 10
The official readme.txt is a good inspiration

social-icons-obvs/social-icons-obvs.php Passed 13 tests

The entry point to "Social Icons Obvs" version 1.1.9 is a PHP file that has certain tags in its header comment area
74 characters long description:
Direct users to your various social accounts using customisable SVG icons.

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
Everything looks great! No dangerous files found in this plugin9,226 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript71,1727394,317
CSS673501,317
PO File143223221,235
PHP203456831,161
Sass1422161818
SVG32016324
JSON20054

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity4.86
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity1.66
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3380.49%
▷ Protected methods00.00%
▷ Private methods819.51%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
4 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/image/sio-icon-sort@2x.png0.20KB0.12KB▼ 38.31%
admin/assets/image/sio-preview-background.png0.46KB0.10KB▼ 78.89%
admin/assets/image/sio-icon-sort.png0.14KB0.12KB▼ 9.29%
admin/assets/image/preview-bg.png0.25KB0.10KB▼ 61.63%