84% social-fabric-analytics-by-collective-bias

Code Review | Social Fabric Analytics From Collective Bias

WordPress plugin Social Fabric Analytics From Collective Bias scored84%from 54 tests.

About plugin

Code review

54 tests

User reviews

1 review

Install metrics

2,000+ active /30,515 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.23ms] Passed 4 tests

Server-side resources used by Social Fabric Analytics From Collective Bias
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.21 ▼6.57
Dashboard /wp-admin3.32 ▼0.0248.79 ▼18.14
Posts /wp-admin/edit.php3.37 ▲0.0250.03 ▼1.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.58 ▼3.09
Media Library /wp-admin/upload.php3.24 ▲0.0237.23 ▲0.84
Collective Bias Analytics /wp-admin/options-general.php?page=cb_analytics3.2133.35

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Social Fabric Analytics From Collective Bias
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.34 ▼0.011.73 ▼0.1743.09 ▼3.44
Dashboard /wp-admin2,202 ▲255.61 ▲0.0685.48 ▼9.8139.46 ▼5.07
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0339.15 ▲3.5035.37 ▼1.22
Add New Post /wp-admin/post-new.php1,532 ▲623.29 ▲0.25596.89 ▼89.5455.18 ▼1.01
Media Library /wp-admin/upload.php1,404 ▲44.20 ▼0.08101.40 ▼12.0943.20 ▼2.76
Collective Bias Analytics /wp-admin/options-general.php?page=cb_analytics8072.0225.5430.62

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: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-fabric-analytics-by-collective-bias/plugin.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: collective bias, social fabric

social-fabric-analytics-by-collective-bias/plugin.php 92% from 13 tests

The primary PHP file in "Social Fabric Analytics From Collective Bias" version 2.5 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-fabric-analytics-by-collective-bias.php" instead of "plugin.php")

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
Good job! No executable or dangerous file extensions detected150 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22037150

PHP code Passed 2 tests

A brief analysis 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.25
Average class complexity5.00
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity1.89
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected