78% wp-custom-social-sharing

Code Review | WP Custom Social Sharing

WordPress plugin WP Custom Social Sharing scored78%from 54 tests.

About plugin

  • Plugin page: wp-custom-social-...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.0
  • WordPress version: 6.3.1
  • First release: Jul 8, 2017
  • Latest release: May 31, 2022
  • Number of updates: 34
  • Update frequency: every 52.6 days
  • Top authors: alokstha1 (79.41%)wptiro (23.53%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,801 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.76ms] Passed 4 tests

A check of server-side resources used by WP Custom Social Sharing
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.36 ▲0.43
Dashboard /wp-admin3.33 ▼0.0254.05 ▼11.17
Posts /wp-admin/edit.php3.38 ▲0.0250.71 ▲3.03
Add New Post /wp-admin/post-new.php5.93 ▲0.04100.93 ▼0.63
Media Library /wp-admin/upload.php3.25 ▲0.0239.96 ▲0.32
Social Sharing /wp-admin/options-general.php?page=wcss-social-share3.5343.54

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 31 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
wcss_settings_options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Custom Social Sharing
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,152 ▲39114.92 ▲0.725.75 ▲3.7651.22 ▲2.69
Dashboard /wp-admin2,259 ▲626.15 ▲0.34110.84 ▲1.6938.32 ▼8.32
Posts /wp-admin/edit.php2,124 ▲272.88 ▲0.9049.56 ▲10.3934.04 ▼0.44
Add New Post /wp-admin/post-new.php1,557 ▲2624.01 ▲0.71682.77 ▼11.0934.83 ▼30.39
Media Library /wp-admin/upload.php1,444 ▲475.42 ▲1.14117.14 ▲0.4345.42 ▼7.04
Social Sharing /wp-admin/options-general.php?page=wcss-social-share2,0073.3256.9395.64

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • wcss_settings_options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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
Please take a closer look at the following
  • 1× 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/wp-custom-social-sharing/templates/admin-settings-page.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=wcss-social-share
    • > Network (severe)
    wp-content/plugins/wp-custom-social-sharing/assets/images/logov2.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

wp-custom-social-sharing/wp-custom-social-sharing.php 85% from 13 tests

The main file in "WP Custom Social Sharing" v. 2.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 204 characters long)

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 plugin15,395 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG40012,223
PHP43301131,584
CSS34091611,516
JavaScript222472

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity50.50
▷ Minimum class complexity27.00
▷ Maximum class complexity74.00
Average method complexity5.71
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
No PNG files were detected