10% customer-care

Code Review | Customer care

WordPress plugin Customer care scored 10% from 54 tests.

About plugin

  • Plugin page: customer-care
  • Plugin version: 0.8.1
  • PHP compatiblity: 7.1.33+
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Jun 2, 2019
  • Latest release: Sep 23, 2021
  • Number of updates: 21
  • Update frequency: every 41.7 days
  • Top authors: nomik05 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 376 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/customer-care/holy_tagline.php+32
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼188.67ms] Passed 4 tests

This is a short check of server-side resources used by Customer care
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.79 ▼0.936.44 ▼15.86
Dashboard /wp-admin1.80 ▼1.255.36 ▼37.51
Posts /wp-admin/edit.php1.80 ▼1.306.17 ▼33.98
Add New Post /wp-admin/post-new.php1.80 ▼3.636.03 ▼651.33
Media Library /wp-admin/upload.php1.80 ▼1.206.35 ▼31.84
Customer care settings /wp-admin/users.php?page=customer_care1.816.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: 1 new table, 2 new options
New tables
wp_customer_care_unsubscribe
New WordPress options
customer_care_settings
customer_care_CPT_ID

Browser metrics Passed 4 tests

Checking browser requirements for Customer care
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,715 ▲11915.92 ▲0.228.98 ▼0.3345.96 ▼1.69
Dashboard /wp-admin2,976 ▲456.16 ▲0.14154.98 ▲5.53111.81 ▼6.27
Posts /wp-admin/edit.php2,751 ▲122.71 ▼0.0171.19 ▼16.0782.38 ▼16.39
Add New Post /wp-admin/post-new.php1,693 ▲19318.76 ▼0.01390.41 ▼7.51112.53 ▲4.52
Media Library /wp-admin/upload.php1,819 ▲715.03 ▲0.02152.60 ▼6.22124.65 ▲7.98
Customer care settings /wp-admin/users.php?page=customer_care1,0822.0558.0471.90

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style 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 customer_care_style 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 1 table in the database
    • wp_customer_care_unsubscribe
  • Zombie WordPress options were found after uninstall: 2 options
    • customer_care_CPT_ID
    • customer_care_settings

Smoke tests 50% 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/users.php?page=customer_care
    • > User notice in wp-includes/functions.php+5663
    wp_enqueue_style 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 customer_care_style handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/users.php?page=customer_care
    • > User notice in wp-includes/functions.php+5663
    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 customer_care_dates handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
    • > GET request to /wp-admin/users.php?page=customer_care
    • > Notice in wp-content/plugins/customer-care/holy_tagline.php+32
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/customer-care/premium_access.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/customer-care/readme_first.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
Please take inspiration from this readme.txt

customer-care/customer_care.php 77% from 13 tests

Analyzing the main PHP file in "Customer care" version 0.8.1
It is important to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Domain Path: The domain path is invalid: folder "/languages/" does not exist
  • Main file name: The principal plugin file should be the same as the plugin slug ("customer-care.php" instead of "customer_care.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,983 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP122434531,842
CSS123998
JavaScript12443

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions57
▷ Named functions57100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/new_logo_back.png26.57KB12.87KB▼ 51.55%
images/new_logo_right.png26.60KB12.91KB▼ 51.46%
images/new_logo_roof.png26.71KB13.20KB▼ 50.57%