83% ultimate-social-share

Code Review | Ultimate Social Media Share

WordPress plugin Ultimate Social Media Share scored83%from 54 tests.

About plugin

  • Plugin page: ultimate-social-s...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.2.0
  • WordPress version: 6.3.1
  • First release: Jan 2, 2021
  • Latest release: Apr 13, 2023
  • Number of updates: 10
  • Update frequency: every 83.5 days
  • Top authors: wpclubz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,029 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.96MB] [CPU: ▲6.97ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Social Media Share
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.51 ▲1.0450.99 ▲6.99
Dashboard /wp-admin4.27 ▲0.9758.05 ▲7.56
Posts /wp-admin/edit.php4.32 ▲0.9654.98 ▲8.49
Add New Post /wp-admin/post-new.php6.85 ▲0.9699.50 ▲4.82
Media Library /wp-admin/upload.php4.19 ▲0.9644.21 ▲11.01

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 172 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
ultimatesocialshare
widget_recent-comments
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Ultimate Social Media Share: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,889 ▲11813.12 ▼1.511.95 ▼0.0244.75 ▲2.28
Dashboard /wp-admin2,264 ▲735.85 ▼0.04102.32 ▲0.2540.71 ▲3.43
Posts /wp-admin/edit.php2,141 ▲552.05 ▲0.0334.70 ▼1.1631.38 ▼4.64
Add New Post /wp-admin/post-new.php1,563 ▲2123.43 ▲0.26684.86 ▲72.4864.17 ▲11.49
Media Library /wp-admin/upload.php1,443 ▲584.23 ▲0.06100.50 ▼4.9842.52 ▼5.01
Style Settings /wp-admin/admin.php?page=ultimate_social_sharings#tab=style-settings2,0084.5290.18103.34
General Settings /wp-admin/admin.php?page=ultimate_social_sharings#tab=general-settings1,7143.9071.3294.99

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • ultimatesocialshare
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

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)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ultimate-social-share/inc/functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-social-share/inc/share_counts.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ultimate-social-share/inc/actions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/ultimate-social-share/ultimatesocialshare.php:19

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
The official readme.txt might help

ultimate-social-share/ultimatesocialshare.php 85% from 13 tests

The main PHP file in "Ultimate Social Media Share" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("ultimate-social-share.php" instead of "ultimatesocialshare.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected26,037 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
CSS81,0165188,684
PHP712,7661,1048,102
Sass1592834,730
JavaScript101,3524224,516
SVG3005

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.66
Average class complexity25.12
▷ Minimum class complexity1.00
▷ Maximum class complexity139.00
Average method complexity6.90
▷ Minimum method complexity1.00
▷ Maximum method complexity52.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes59
▷ Abstract classes23.39%
▷ Concrete classes5796.61%
▷ Final classes00.00%
Methods241
▷ Static methods3916.18%
▷ Public methods24099.59%
▷ Protected methods10.41%
▷ Private methods00.00%
Functions48
▷ Named functions4695.83%
▷ Anonymous functions24.17%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
57 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/socialicons/stackoverflow.png0.92KB0.48KB▼ 47.83%
admin/assets/images/socialicons/skype.png0.94KB0.49KB▼ 47.29%
admin/assets/images/socialicons/vkontakte.png0.66KB0.37KB▼ 44.28%
admin/assets/images/socialicons/wordpress.png1.44KB0.68KB▼ 52.55%
admin/assets/images/socialicons/behance.png0.75KB0.43KB▼ 41.68%