68% fbar-social

Code Review | FBar Social

WordPress plugin FBar Social scored68%from 54 tests.

About plugin

  • Plugin page: fbar-social
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jun 27, 2013
  • Number of updates: 8
  • Update frequency: every 1.9 days
  • Top authors: calvin_ngan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /2,013 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼1.93MB] [CPU: ▼52.60ms] Passed 4 tests

Server-side resources used by FBar Social
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.418.29 ▼33.12
Dashboard /wp-admin2.07 ▼1.236.97 ▼43.32
Posts /wp-admin/edit.php2.07 ▼1.285.36 ▼45.59
Add New Post /wp-admin/post-new.php2.07 ▼3.815.66 ▼88.35
Media Library /wp-admin/upload.php2.07 ▼1.166.14 ▼25.65

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: 1 new table, 6 new options
New tables
wp_socialinfo_table
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for FBar Social
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,263 ▲50218.77 ▲4.15138.15 ▲136.4656.20 ▲11.87
Dashboard /wp-admin2,196 ▲165.76 ▲0.0984.78 ▼19.3869.47 ▲24.91
Posts /wp-admin/edit.php2,127 ▲272.26 ▲0.2537.55 ▲0.8735.74 ▼1.15
Add New Post /wp-admin/post-new.php1,692 ▲28820.29 ▲1.93643.40 ▼4.4847.57 ▼2.87
Media Library /wp-admin/upload.php1,426 ▲294.28 ▲0.09103.13 ▼4.7569.77 ▲23.38

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the media-upload handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/fbar-social/headercss.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: organic in wp-content/plugins/fbar-social/headercss.php on line 5
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/fbar-social/headercss.php on line 4
    • > PHP Notice
      Undefined variable: text_color in wp-content/plugins/fbar-social/headercss.php on line 49
    • > PHP Notice
      Undefined variable: border_color in wp-content/plugins/fbar-social/headercss.php on line 14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/fbar-social/fbar-social-plugin.php:11
    • > PHP Notice
      Undefined variable: display_mode in wp-content/plugins/fbar-social/headercss.php on line 16
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/fbar-social/headercss.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/fbar-social/views/main.php:9
    • > PHP Notice
      Undefined variable: display_mode in wp-content/plugins/fbar-social/headercss.php on line 15
    • > PHP Notice
      Undefined variable: color_scheme in wp-content/plugins/fbar-social/headercss.php on line 13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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 need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (User Interface), #2 (Black Full Width Bar), #3 (Blue Full Width Bar), #4 (Black Fixed Width Bar)
You can take inspiration from this readme.txt

fbar-social/fbar-social-plugin.php 85% from 13 tests

The entry point to "FBar Social" version 1.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("fbar-social.php" instead of "fbar-social-plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 214 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,477 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript2149128664
PHP79665510
CSS24214303

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
13 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/f.png0.75KB0.72KB▼ 5.05%
images/y.png2.13KB1.62KB▼ 23.71%
images/logo.png2.32KB1.55KB▼ 33.22%
images/i.png2.52KB1.76KB▼ 30.14%
images/r.png1.10KB1.12KB0.00%