83% social-sharing-themesmatic

Code Review | Social Sharing Buttons by ThemesMatic

WordPress plugin Social Sharing Buttons by ThemesMatic scored83%from 54 tests.

About plugin

  • Plugin page: social-sharing-th...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 26, 2017
  • Latest release: Feb 28, 2020
  • Number of updates: 7
  • Update frequency: every 126.3 days
  • Top authors: ThemesMatic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /7,077 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
Installer ran successfully

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

This is a short check of server-side resources used by Social Sharing Buttons by ThemesMatic
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.31 ▼0.05
Dashboard /wp-admin3.32 ▲0.0247.02 ▼4.32
Posts /wp-admin/edit.php3.37 ▲0.0150.58 ▲5.02
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.06 ▼2.47
Media Library /wp-admin/upload.php3.24 ▲0.0133.96 ▼1.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
themesmatic_sharing_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Social Sharing Buttons by ThemesMatic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲18713.86 ▼0.728.21 ▲6.3639.94 ▼5.76
Dashboard /wp-admin2,221 ▲335.84 ▼0.0199.77 ▼18.8040.83 ▼6.53
Posts /wp-admin/edit.php2,107 ▲182.02 ▼0.0440.13 ▲3.5435.63 ▲1.36
Add New Post /wp-admin/post-new.php1,530 ▼1323.30 ▲4.79599.95 ▼51.9548.88 ▼7.78
Media Library /wp-admin/upload.php1,400 ▲124.24 ▲0.0596.09 ▼15.8142.16 ▼4.31

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/social-sharing-themesmatic/themesmatic-display.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/social-sharing-themesmatic/social-list.php:536
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/social-sharing-themesmatic/social-sharing-themesmatic.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5, #6, #7 in social-sharing-themesmatic/assets to your readme.txt
  • Requires at least: Invalid plugin version format
The official readme.txt is a good inspiration

social-sharing-themesmatic/social-sharing-themesmatic.php 85% from 13 tests

This is the main PHP file of "Social Sharing Buttons by ThemesMatic" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 269 characters long)
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected6,326 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
CSS52162,679
SVG3002,673
PHP512071779
JavaScript21413195

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.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
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/themesmatic-logo-small.png4.90KB3.38KB▼ 30.97%
img/themesmatic-plugin-icon.png2.08KB0.92KB▼ 55.82%
img/themesmatic-sharing-header.png46.46KB19.89KB▼ 57.20%