10% sovratec-case-management

Code Review | Plugin Name: Sovratec Case Management

WordPress plugin Plugin Name: Sovratec Case Managementscored10%from 54 tests.

About plugin

  • Plugin page: sovratec-case-man...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 25, 2022
  • Latest release: Jun 25, 2022
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: sovratecdev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.26MB] [CPU: ▼5.85ms] Passed 4 tests

A check of server-side resources used by Plugin Name: Sovratec Case Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2644.95 ▲3.14
Dashboard /wp-admin3.56 ▲0.2654.00 ▼0.73
Posts /wp-admin/edit.php3.68 ▲0.3248.50 ▲1.22
Add New Post /wp-admin/post-new.php6.16 ▲0.2886.23 ▼27.04
Media Library /wp-admin/upload.php3.49 ▲0.2642.19 ▲6.21
Edit Order /wp-admin/admin.php?page=edit-order3.4330.27
Case Type /wp-admin/admin.php?page=casetype_management3.5034.07
Workflow Status /wp-admin/admin.php?page=workflowstatus_management3.5131.36
Home /wp-admin/admin.php?page=sov-case-management-dashboard3.5334.16
Email /wp-admin/admin.php?page=email_management3.4835.17

Server storage [IO: ▲11.83MB] [DB: ▲0.01MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/sovratec-case-management/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 244 new files
Database: 6 new tables, 7 new options
New tables
wp_case_management_workflow_list
wp_case_management_case_type
wp_case_management_case
wp_case_management_comments
wp_case_management_attachments
wp_case_management_configuration
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
recovery_mode_email_last_sent
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: Sovratec Case Management
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,998 ▲23714.22 ▲0.0318.10 ▲16.1946.81 ▼0.44
Dashboard /wp-admin2,259 ▲565.87 ▲0.0199.05 ▼9.9639.19 ▼6.19
Posts /wp-admin/edit.php2,135 ▲352.05 ▲0.0135.48 ▼0.2733.44 ▲0.94
Add New Post /wp-admin/post-new.php1,555 ▲923.19 ▲0.13699.69 ▼32.7963.78 ▲5.60
Media Library /wp-admin/upload.php1,435 ▲324.21 ▲0.07103.48 ▲1.9349.25 ▲4.64
Edit Order /wp-admin/admin.php?page=edit-order7151.378.0020.54
Case Type /wp-admin/admin.php?page=casetype_management1,0783.0042.1245.04
Workflow Status /wp-admin/admin.php?page=workflowstatus_management1,0742.9742.4625.23
Home /wp-admin/admin.php?page=sov-case-management-dashboard1,1682.9535.3428.17
Email /wp-admin/admin.php?page=email_management1,93414.01374.8478.68

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall successfully, leaving 6 tables in the database
    • wp_case_management_comments
    • wp_case_management_case_type
    • wp_case_management_case
    • wp_case_management_workflow_list
    • wp_case_management_configuration
    • wp_case_management_attachments
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • theysaidso_admin_options
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=edit-order
    • > Warning in wp-content/plugins/sovratec-case-management/public/class-sov-case-management-public.php+113
    require_once(wp-content/plugins/sovratec-case-management/public/partials/sov-case-management-edit-display.php): failed to open stream: No such file or directory
    • > GET request to /wp-admin/admin.php?page=edit-order
    • > Compile error in wp-content/plugins/sovratec-case-management/public/class-sov-case-management-public.php+113
    require_once(): Failed opening required 'wp-content/plugins/sovratec-case-management/public/partials/sov-case-management-edit-display.php' (include_path='.:/usr/share/php')
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sov-case-management-dashboard
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/class-sov-case-management-request.php+229
    Undefined index: action
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sov-case-management-dashboard
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/class-sov-case-management-request.php+262
    Undefined variable: text
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=sov-case-management-dashboard
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/class-sov-case-management-request.php+267
    Undefined index: tab
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=email_management
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-configurations/email-settings/class-sov-case-management-email-configurations.php+44
    Undefined index: nonce
    • > GET request to /wp-admin/admin.php?page=sov-case-management-dashboard
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/class-sov-case-management-request.php+240
    Undefined index: orderUpdateID
    • > GET request to /wp-admin/admin.php?page=email_management
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=email_management
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-configurations/email-settings/views/add-emailtemplate.php+20
    Undefined variable: scmSuperAdmin
    • > GET request to /wp-admin/admin.php?page=email_management
    • > Notice in wp-content/plugins/sovratec-case-management/includes/case-configurations/email-settings/views/add-emailtemplate.php+48
    Undefined variable: user_data

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/sovratec-case-management/admin/partials/sov-case-management-admin-display.php
    • > /wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/views/case-details.php
  • 37× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/class-sov-case-management-pending.php on line 24
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/sovratec-case-management/includes/case-configurations/workflow-status-settings/class-sov-case-management-workflow-configurations.php on line 23
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sovratec-case-management/includes/case-management-admin-tabs/class-sov-case-management-pending.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function scm_case_data() in wp-content/plugins/sovratec-case-management/public/partials/sov-case-management-newcase-display.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sovratec-case-management/includes/case-configurations/workflow-status-settings/class-sov-case-management-workflow-configurations.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/sovratec-case-management/includes/case-configurations/email-settings/class-sov-case-management-email-configurations.php:39
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/sovratec-case-management/includes/case-configurations/case-type-settings/class-sov-case-management-casetype-configurations.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_user_id() in wp-content/plugins/sovratec-case-management/public/partials/sov-case-management-editcase-display.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sovratec-case-management/includes/case-configurations/workflow-status-settings/class-sov-case-management-workflow.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/sovratec-case-management/includes/case-configurations/case-type-settings/views/add-casetype.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=edit-order
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: tinymce is not defined" "ReferenceError: tinymce is not defined\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/sovratec-case-management/admin/js/sov-case-management-admin.js?ver=1.0.0:35:4)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=edit-order
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught ReferenceError: tinymce is not defined

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === Plugin Name: Sovratec Case Management=== )
You can take inspiration from this readme.txt

sovratec-case-management/sov-case-management.php 85% from 13 tests

The primary PHP file in "Plugin Name: Sovratec Case Management" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("sovratec-case-management.php" instead of "sov-case-management.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin88,440 lines of code in 203 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1316,2673,24743,592
CSS358,28128037,342
PHP347311,0384,466
TypeScript1003,036
Markdown2104

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.80
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods150
▷ Static methods42.67%
▷ Public methods13892.00%
▷ Protected methods00.00%
▷ Private methods128.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/calendar.png0.74KB0.48KB▼ 34.96%
admin/assets/images/notepad.png0.88KB0.90KB0.00%
admin/assets/lib/img/switch.png0.53KB0.64KB0.00%