84% socialbugcrm

Code Review | SocialBugCRM

WordPress plugin SocialBugCRM scored84%from 54 tests.

About plugin

  • Plugin page: socialbugcrm
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.3-6.3.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2020
  • Latest release: Sep 8, 2023
  • Number of updates: 73
  • Update frequency: every 18.0 days
  • Top authors: socialbug (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

20+ active /1,718 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼0.19ms] Passed 4 tests

A check of server-side resources used by SocialBugCRM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2236.85 ▲0.41
Dashboard /wp-admin3.39 ▲0.0944.80 ▼1.56
Posts /wp-admin/edit.php3.50 ▲0.1545.93 ▲1.85
Add New Post /wp-admin/post-new.php5.98 ▲0.1090.68 ▲5.92
Media Library /wp-admin/upload.php3.31 ▲0.0934.37 ▼1.44

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: 1 new table, 6 new options
New tables
wp_socialbugcrm_CustomerRewards
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by SocialBugCRM
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.70 ▼0.701.70 ▼0.0541.91 ▼3.00
Dashboard /wp-admin2,218 ▲275.85 ▼0.0396.58 ▼9.1838.19 ▼6.04
Posts /wp-admin/edit.php2,104 ▲152.03 ▲0.0140.32 ▲3.6839.92 ▼2.03
Add New Post /wp-admin/post-new.php1,527 ▼117.60 ▼0.38623.04 ▲20.6351.74 ▼4.98
Media Library /wp-admin/upload.php1,400 ▲154.19 ▼0.0499.43 ▼5.5540.96 ▼3.82

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
The following issues need your attention
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/socialbugcrm/includes/db.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function SocialbugCRM\\Includes\\register_activation_hook() in wp-content/plugins/socialbugcrm/includes/optionsBuilder.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/socialbugcrm/includes/db.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'SocialbugCRM\\Includes\\DB' not found in wp-content/plugins/socialbugcrm/includes/sb.php:6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/socialbugcrm/includes/db.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'SocialbugCRM\\Classes\\Data' not found in wp-content/plugins/socialbugcrm/classes/Customer.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SocialbugCRM\\Classes\\Data' not found in wp-content/plugins/socialbugcrm/classes/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/socialbugcrm/socialbugcrm.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

socialbugcrm/socialbugcrm.php Passed 13 tests

The primary PHP file in "SocialBugCRM" version 1.0.5 is used by WordPress to initiate all plugin functionality
57 characters long description:
Integration plugin to connect with SocialBugCRM platform.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected617 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9186240614
JavaScript1003

PHP code Passed 2 tests

An short overview of 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.16
Average class complexity5.57
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces3
Interfaces2
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods96
▷ Static methods11.04%
▷ Public methods9598.96%
▷ Protected methods00.00%
▷ Private methods11.04%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants5
▷ Global constants360.00%
▷ Class constants240.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin