10% fast-custom-social-share-by-codebard

Code Review | Fast Custom Social Share by CodeBard

WordPress plugin Fast Custom Social Share by CodeBard scored10%from 54 tests.

About plugin

  • Plugin page: fast-custom-socia...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 16, 2018
  • Latest release: Apr 20, 2023
  • Number of updates: 46
  • Update frequency: every 34.5 days
  • Top authors: CodeBard (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,612 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/plugin.php+125
    Undefined index: setup_is_being_done

Server metrics [RAM: ▼0.83MB] [CPU: ▼33.46ms] Passed 4 tests

Analyzing server-side resources used by Fast Custom Social Share by CodeBard
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1344.78 ▲4.22
Dashboard /wp-admin3.12 ▼0.1926.26 ▼27.44
Posts /wp-admin/edit.php3.12 ▼0.2423.58 ▼26.20
Add New Post /wp-admin/post-new.php3.12 ▼2.7724.66 ▼67.77
Media Library /wp-admin/upload.php3.12 ▼0.1122.63 ▼12.43
Fast Social Share /wp-admin/admin.php?page=setup_wizard_cb_p23.1222.97

Server storage [IO: ▲2.14MB] [DB: ▲0.03MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 555 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
db_upgraded
cb_p2_lang_en-US
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
cb_p2_options

Browser metrics Passed 4 tests

Checking browser requirements for Fast Custom Social Share by CodeBard
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲8614.30 ▼0.061.97 ▲0.3448.70 ▲2.61
Dashboard /wp-admin2,209 ▲325.50 ▼0.0794.27 ▼6.1482.91 ▲38.03
Posts /wp-admin/edit.php2,130 ▲302.11 ▲0.0736.84 ▼1.0931.64 ▼7.28
Add New Post /wp-admin/post-new.php1,562 ▲3623.27 ▲0.13652.46 ▼44.13141.32 ▲88.13
Media Library /wp-admin/upload.php1,426 ▲264.17 ▼0.04123.97 ▲17.4882.37 ▲34.18
Fast Social Share /wp-admin/admin.php?page=setup_wizard_cb_p22,5534.53114.9039.19

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • cb_p2_lang_en-US
    • widget_recent-posts
    • cb_p2_options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=setup_wizard_cb_p2
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/admin.php?page=setup_wizard_cb_p2
    • > Notice in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/plugin.php+1259
    Undefined index: cb_p2_tab

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/admin_settings_page_footer.php
    • > /wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/admin_settings_page_header.php
    • > /wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/admin_settings_form_header.php
    • > /wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/reset_settings_form.php
    • > /wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/admin_settings_form_footer.php
  • 23× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/hardcoded_vars.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/date_picker.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_types() in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/general.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Upgrader_Skin' not found in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/upgrader_skin.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/default_options.php:6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setup_1.php:1
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/dashboard.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/customize_design.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/setting_sections/social_networks.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fast-custom-social-share-by-codebard/plugin/includes/direct_includes.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: social share, social media, share buttons, share, social media share

fast-custom-social-share-by-codebard/index.php 77% from 13 tests

The entry point to "Fast Custom Social Share by CodeBard" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder does not exist ("/lang")
  • Main file name: The principal plugin file should be the same as the plugin slug ("fast-custom-social-share-by-codebard.php" instead of "index.php")
  • Text Domain: Please use dashes and lowercase characters for text domains

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 detected7,113 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP312,3803875,683
CSS22500709
JavaScript221734642
Smarty125979

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity164.25
▷ Minimum class complexity1.00
▷ Maximum class complexity401.00
Average method complexity5.73
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods138
▷ Static methods10.72%
▷ Public methods13698.55%
▷ Protected methods00.00%
▷ Private methods21.45%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
494 PNG files occupy 1.47MB with 0.74MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugin/images/set_3/googleplus/42.png2.72KB1.08KB▼ 60.49%
images/rapier-logo.png10.83KB4.89KB▼ 54.80%
plugin/images/set_5/facebook/32.png1.97KB0.99KB▼ 50.10%
plugin/images/set_5/linkedin/42.png2.54KB1.52KB▼ 40.17%
plugin/images/set_5/pinterest/48.png3.42KB1.84KB▼ 46.31%