84% bit-social

Code Review | Bit Social (Beta)

WordPress plugin Bit Social (Beta) scored84%from 54 tests.

About plugin

  • Plugin page: bit-social
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2023
  • Latest release: Oct 11, 2023
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: bitpressadmin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /95 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.82ms] Passed 4 tests

A check of server-side resources used by Bit Social (Beta)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.94 ▲2.05
Dashboard /wp-admin3.42 ▲0.0745.35 ▼12.66
Posts /wp-admin/edit.php3.47 ▲0.1143.25 ▼2.57
Add New Post /wp-admin/post-new.php5.94 ▲0.0591.29 ▼6.10
Media Library /wp-admin/upload.php3.28 ▲0.0535.36 ▲2.45

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 131 new files
Database: 6 new tables, 10 new options
New tables
wp_bit_social_schedules
wp_bit_social_accounts
wp_bit_social_custom_apps
wp_bit_social_settings
wp_bit_social_logs
wp_bit_social_groups
New WordPress options
widget_theysaidso_widget
db_upgraded
bit_social_secret_key
can_compress_scripts
bit_social_version
bit_social_installed
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
bit_social_db_version

Browser metrics Passed 4 tests

An overview of browser requirements for Bit Social (Beta)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9614.08 ▼0.331.71 ▼0.0344.49 ▲2.22
Dashboard /wp-admin2,251 ▲705.64 ▼0.0382.61 ▼19.9537.55 ▼7.18
Posts /wp-admin/edit.php2,153 ▲531.98 ▼0.0638.30 ▲2.5433.19 ▼2.26
Add New Post /wp-admin/post-new.php1,564 ▲2918.19 ▼0.10623.67 ▼30.9568.46 ▲2.16
Media Library /wp-admin/upload.php1,453 ▲534.22 ▲0.0897.65 ▼9.5041.85 ▼3.41
Custom Apps /wp-admin/admin.php?page=bit-social#/apps1,1306.35154.9853.47
Settings /wp-admin/admin.php?page=bit-social#/settings/general1,1559.76182.3566.33
Accounts /wp-admin/admin.php?page=bit-social#/accounts1,3679.00199.1841.36
Logs /wp-admin/admin.php?page=bit-social#/logs1,2898.53152.9844.92
Schedules /wp-admin/admin.php?page=bit-social#/schedules1,2408.20153.5136.43

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • bit_social_secret_key

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 fix the following items
  • 29× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Utils\\WpPost' not found in wp-content/plugins/bit-social/backend/app/HTTP/Controllers/WpPostController.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'BitApps\\Social\\Core\\Database\\Model' not found in wp-content/plugins/bit-social/backend/app/Model/Group.php:7
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Core\\Http\\Request\\Validator\\ValidateAttributes' not found in wp-content/plugins/bit-social/backend/core/Http/Request/Validator/Validator.php on line 5
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Utils\\Common' not found in wp-content/plugins/bit-social/backend/app/HTTP/Controllers/ScheduleController.php on line 13
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Core\\Database\\Relations' not found in wp-content/plugins/bit-social/backend/core/Database/Model.php on line 74
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Utils\\Common' not found in wp-content/plugins/bit-social/backend/app/HTTP/Controllers/RetryController.php on line 13
    • > PHP Fatal error
      Uncaught Error: Interface 'BitApps\\Social\\HTTP\\Services\\Interfaces\\AuthServiceInterface' not found in wp-content/plugins/bit-social/backend/app/HTTP/Services/Social/TwitterService/TwitterOAuth1Service.php:12
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Core\\Http\\IpTool' not found in wp-content/plugins/bit-social/backend/core/Http/Request/Request.php on line 16
    • > PHP Fatal error
      Uncaught Error: Interface 'BitApps\\Social\\HTTP\\Services\\Interfaces\\PlatformAppInfoResolverInterface' not found in wp-content/plugins/bit-social/backend/app/HTTP/Services/Social/AppInfo/FacebookAppInfoResolver.php:8
    • > PHP Fatal error
      Trait 'BitApps\\Social\\Utils\\Common' not found in wp-content/plugins/bit-social/backend/app/HTTP/Services/Social/FacebookService/RetryFacebookService.php on line 10

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
9 plugin tags: twitter, linkedin, facebook, post scheduler, schedule...

bit-social/index.php 85% from 13 tests

The main PHP script in "Bit Social (Beta)" version 0.1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bit-social.php" instead of "index.php")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.0" instead of "5.6")

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
Good job! No executable or dangerous file extensions detected9,270 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP1042,2242,1848,741
JavaScript2862486
CSS26737
JSON1005
SVG1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity13.31
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces29
Interfaces4
Traits9
Classes81
▷ Abstract classes22.47%
▷ Concrete classes7997.53%
▷ Final classes3443.04%
Methods702
▷ Static methods13118.66%
▷ Public methods60786.47%
▷ Protected methods141.99%
▷ Private methods8111.54%
Functions18
▷ Named functions15.56%
▷ Anonymous functions1794.44%
Constants43
▷ Global constants00.00%
▷ Class constants43100.00%
▷ Public constants43100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin