10% business-manager

Code Review | WordPress ERP, HR, CRM, and Project Management Plugin - Business Manager

WordPress plugin WordPress ERP, HR, CRM, and Project Management Plugin - Business Manager scored10%from 54 tests.

About plugin

  • Plugin page: business-manager
  • Plugin version: 1.5.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4
  • WordPress version: 6.3.1
  • First release: Nov 30, 2017
  • Latest release: Oct 25, 2023
  • Number of updates: 125
  • Update frequency: every 17.3 days
  • Top authors: bzmngr (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

700+ active /31,766 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/business-manager/includes/employee/class-employee.php+543
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

Server metrics [RAM: ▼0.76MB] [CPU: ▼41.76ms] Passed 4 tests

A check of server-side resources used by WordPress ERP, HR, CRM, and Project Management Plugin - Business Manager
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.22 ▼0.2513.76 ▼26.70
Dashboard /wp-admin3.26 ▼0.0914.27 ▼49.83
Posts /wp-admin/edit.php3.26 ▼0.1021.18 ▼22.09
Add New Post /wp-admin/post-new.php3.26 ▼2.6317.12 ▼68.41
Media Library /wp-admin/upload.php3.26 ▲0.0318.06 ▼15.89
  Reviews /wp-admin/edit.php?post_type=bm-review&orderby=_bm_review_date&order=desc3.2717.21
Departments /wp-admin/edit-tags.php?taxonomy=bm-department&post_type=bm-employee3.3315.07
Employees /wp-admin/edit.php?post_type=bm-employee&orderby=_bm_employee_last_name&order=asc3.2714.86
Projects /wp-admin/edit.php?post_type=bm-project&orderby=title&order=asc3.2714.40
Settings /wp-admin/admin.php?page=business-manager-general3.2614.32
Dashboard /wp-admin/admin.php?page=business-manager3.2614.29
  Leave /wp-admin/edit.php?post_type=bm-leave&orderby=_bm_leave_start&order=desc3.2715.37
Documents /wp-admin/edit.php?post_type=bm-document&orderby=title&order=asc3.2714.34
Clients /wp-admin/edit.php?post_type=bm-client&orderby=_bm_client&order=asc3.2715.67
  Calendar /wp-admin/admin.php?page=business-manager-calendar3.2617.05

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 486 new files
Database: no new tables, 13 new options
New WordPress options
theysaidso_admin_options
business-manager-client
can_compress_scripts
business-manager-extensions
widget_theysaidso_widget
business-manager-document
business-manager-employee
widget_recent-comments
widget_recent-posts
business-manager-project
...

Browser metrics Passed 4 tests

Checking browser requirements for WordPress ERP, HR, CRM, and Project Management Plugin - Business Manager
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,050 ▲30415.81 ▲1.321.91 ▲0.3139.08 ▼4.34
Dashboard /wp-admin2,453 ▲2837.31 ▲1.65125.28 ▲28.5037.50 ▼0.86
Posts /wp-admin/edit.php2,381 ▲2783.82 ▲1.8553.22 ▲17.8330.31 ▼2.25
Add New Post /wp-admin/post-new.php1,630 ▲9322.66 ▲4.28695.20 ▲45.3637.19 ▼45.03
Media Library /wp-admin/upload.php1,521 ▲1215.11 ▲0.9296.52 ▲3.7341.46 ▼4.49
  Reviews /wp-admin/edit.php?post_type=bm-review&orderby=_bm_review_date&order=desc1,5233.7453.5628.63
Departments /wp-admin/edit-tags.php?taxonomy=bm-department&post_type=bm-employee1,5663.6048.0129.82
Employees /wp-admin/edit.php?post_type=bm-employee&orderby=_bm_employee_last_name&order=asc1,5183.7251.8527.63
Projects /wp-admin/edit.php?post_type=bm-project&orderby=title&order=asc1,6363.8650.7028.85
Settings /wp-admin/admin.php?page=business-manager-general1,4954.1051.8524.99
Dashboard /wp-admin/admin.php?page=business-manager1,1683.8444.5930.07
  Leave /wp-admin/edit.php?post_type=bm-leave&orderby=_bm_leave_start&order=desc1,5153.7252.0227.43
Documents /wp-admin/edit.php?post_type=bm-document&orderby=title&order=asc1,3953.7649.9726.80
Clients /wp-admin/edit.php?post_type=bm-client&orderby=_bm_client&order=asc1,4443.7252.7827.45
  Calendar /wp-admin/admin.php?page=business-manager-calendar1,7268.69128.1541.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/business-manager/includes/employee/class-employee.php+543
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence
  • This plugin does not fully uninstall, leaving 13 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • business-manager-general
    • business-manager-project
    • widget_recent-comments
    • business_manager_db_version
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • business-manager-document
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 17 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=business-manager-calendar
    • > Deprecated in wp-content/plugins/business-manager/includes/employee/class-employee.php+543
    The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence

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
Please fix the following items
  • 57× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/business-manager/includes/lib/cmb2/includes/types/CMB2_Type_Checkbox.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-manager/includes/lib/cmb2/includes/helper-functions.php:131
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/business-manager/includes/lib/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-manager/includes/template-hooks.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/business-manager/includes/lib/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/business-manager/includes/lib/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-manager/includes/lib/cmb2-attached-posts/init.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_File_Base' not found in wp-content/plugins/business-manager/includes/lib/cmb2/includes/types/CMB2_Type_File.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function cmb2_dir() in wp-content/plugins/business-manager/includes/lib/cmb2/includes/rest-api/CMB2_REST_Controller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/business-manager/includes/lib/cmb2/includes/types/CMB2_Type_Picker_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% 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
5 plugin tags: erp, hr, crm, business management, project management

business-manager/business-manager.php 69% from 13 tests

Analyzing the main PHP file in "WordPress ERP, HR, CRM, and Project Management Plugin - Business Manager" version 1.5.7
Please make the necessary changes and fix the following:
  • Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 153 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
No dangerous file extensions were detected75,803 lines of code in 305 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,78519,20833,378
PHP1234,2619,32017,481
JSON60013,515
CSS207291,2327,337
JavaScript208128892,748
Markdown1033601,175
Svelte216084
XML214252
YAML195133

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.20
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes116
▷ Abstract classes97.76%
▷ Concrete classes10792.24%
▷ Final classes10.93%
Methods950
▷ Static methods11912.53%
▷ Public methods83888.21%
▷ Protected methods10110.63%
▷ Private methods111.16%
Functions139
▷ Named functions13093.53%
▷ Anonymous functions96.47%
Constants25
▷ Global constants1352.00%
▷ Class constants1248.00%
▷ Public constants12100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
34 PNG files occupy 0.54MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/lib/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/lib/cmb2-tabs-master/screenshots/options-page-horizontal.png74.00KB14.74KB▼ 80.09%
assets/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
includes/lib/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%