51% erp

Code Review | WP ERP | Complete HR solution with recruitment & job listings | WooCommerce CRM & Accounting

WordPress plugin WP ERP | Complete HR solution with recruitment & job listings | WooCommerce CRM & Accounting scored51%from 54 tests.

About plugin

  • Plugin page: erp
  • Plugin version: 1.12.7
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2016
  • Latest release: Sep 21, 2023
  • Number of updates: 218
  • Update frequency: every 12.6 days
  • Top authors: manikmist09 (21.1%)ediamin (19.27%)tareq1988 (14.22%)nadim0988 (12.39%)tanmjay (11.47%)

Code review

54 tests

User reviews

136 reviews

Install metrics

8,000+ active /568,264 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.55MB] [CPU: ▲16.08ms] 75% from 4 tests

This is a short check of server-side resources used by WP ERP | Complete HR solution with recruitment & job listings | WooCommerce CRM & Accounting
Please take the time to fix the following items
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,136.98ms on /wp-admin/admin.php?page=erp-addons)
PageMemory (MB)CPU Time (ms)
Home /4.48 ▲1.0153.60 ▲14.12
Dashboard /wp-admin5.09 ▲1.7862.42 ▲12.40
Posts /wp-admin/edit.php5.10 ▲1.7467.64 ▲21.14
Add New Post /wp-admin/post-new.php9.27 ▲3.38170.19 ▲74.37
Media Library /wp-admin/upload.php4.91 ▲1.6849.40 ▲16.65
Modules /wp-admin/admin.php?page=erp-modules4.981,163.82
Tools /wp-admin/admin.php?page=erp-tools4.9153.56
Dashboard /wp-admin/admin.php?page=erp5.501,410.95
HR /wp-admin/admin.php?page=erp-hr6.0674.29
HR Announcement /wp-admin/edit.php?post_type=erp_hr_announcement3.8519.04
WP ERP /wp-admin/index.php?page=erp-welcome4.9150.05
CRM /wp-admin/admin.php?page=erp-crm6.0263.74
Add Announcement /wp-admin/post-new.php?post_type=erp_hr_announcement6.1076.25
Accounting /wp-admin/admin.php?page=erp-accounting5.0867.43
WP ERP Pro /wp-admin/admin.php?page=erp-addons5.001,136.98

Server storage [IO: ▲29.82MB] [DB: ▲0.22MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The filesystem usage should be lower than 25MB (currently using 29.82MB)
Filesystem: 3,713 new files
Database: 85 new tables, 28 new options
New tables
wp_erp_acct_tax_pay
wp_erp_acct_ledgers
wp_erp_hr_employee_history
wp_erp_acct_people_trn_details
wp_erp_acct_trn_status_types
wp_erp_acct_transfer_voucher
wp_erp_acct_purchase_details_tax
wp_erp_acct_bill_account_details
wp_erp_hr_employee_performance
wp_erp_hr_education
...
New WordPress options
widget_recent-posts
wp_erp_version
erp_email_settings_transectional-email-estimate
erp_email_settings_transectional-email-pay-purchase
erp_email_settings_new-task-assigned
erp_settings_erp-crm_subscription
erp_email_settings_employee-welcome
erp_email_settings_transectional-email-purchase-order
widget_erp-subscription-from-widget
erp_email_settings_new-contact-assigned
...

Browser metrics Passed 4 tests

A check of browser resources used by WP ERP | Complete HR solution with recruitment & job listings | WooCommerce CRM & Accounting
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,445 ▲68415.28 ▲1.005.13 ▲3.4640.71 ▼3.26
Dashboard /wp-admin2,714 ▲5376.62 ▲0.96114.47 ▲16.1539.72 ▼1.94
Posts /wp-admin/edit.php2,643 ▲5433.78 ▲1.7959.39 ▲22.5534.08 ▲0.38
Add New Post /wp-admin/post-new.php2,009 ▲48321.69 ▼1.43635.33 ▼8.3830.95 ▼22.09
Media Library /wp-admin/upload.php1,816 ▲4164.59 ▲0.4283.13 ▼11.4540.51 ▼0.93
Modules /wp-admin/admin.php?page=erp-modules3,0513.5446.36113.06
Tools /wp-admin/admin.php?page=erp-tools1,5033.7347.7729.84
Dashboard /wp-admin/admin.php?page=erp1,7683.5945.5040.52
HR /wp-admin/admin.php?page=erp-hr3,4826.08135.1769.33
HR Announcement /wp-admin/edit.php?post_type=erp_hr_announcement2,1824.5064.5246.50
WP ERP /wp-admin/index.php?page=erp-welcome1,3713.5144.5649.68
CRM /wp-admin/admin.php?page=erp-crm2,5806.35111.7848.53
Add Announcement /wp-admin/post-new.php?post_type=erp_hr_announcement2,9337.63182.2363.98
Accounting /wp-admin/admin.php?page=erp-accounting1,6359.12263.3983.07
WP ERP Pro /wp-admin/admin.php?page=erp-addons2,2443.6044.21170.27

Uninstaller [IO: ▲0.00MB] [DB: ▲0.22MB] 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
  • This plugin does not fully uninstall, leaving 85 tables in the database
    • wp_erp_acct_journals
    • wp_erp_peoples
    • wp_erp_acct_ledger_categories
    • wp_erp_acct_pay_purchase
    • wp_erp_acct_tax_agency_details
    • wp_erp_acct_purchase_account_details
    • wp_erp_acct_purchase_details
    • wp_erp_acct_trn_status_types
    • wp_erp_acct_payment_methods
    • wp_erp_hr_leave_approval_status
    • ...
  • The uninstall procedure has failed, leaving 28 options in the database
    • erp_email_settings_rejected-leave-request
    • erp_email_settings_new-leave-request
    • erp_email_settings_transectional-email-pay-purchase
    • erp_email_settings_transectional-email-purchase-order
    • widget_recent-posts
    • erp_email_settings_hiring-anniversary-wish
    • erp_email_settings_transectional-email
    • erp_email_settings_new-task-assigned
    • widget_recent-comments
    • erp_email_settings_transectional-email-purchase
    • ...

Smoke tests 25% 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
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=erp
    • > User deprecated in wp-content/plugins/erp/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php+264
    The "Doctrine\Common\Inflector\Inflector::pluralize" method is deprecated and will be dropped in doctrine/inflector 2.0. Please update to the new Inflector API.

SRP 0% 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 fix the following items
  • 16× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/erp/vendor/google/apiclient/examples/url-shortener.php
    • > /wp-content/plugins/erp/vendor/google/apiclient/examples/multi-api.php
    • > /wp-content/plugins/erp/vendor/illuminate/pagination/resources/views/semantic-ui.blade.php
    • > /wp-content/plugins/erp/modules/hrm/views/js-templates/add-more.php
    • > /wp-content/plugins/erp/vendor/illuminate/pagination/resources/views/simple-bootstrap-4.blade.php
    • > /wp-content/plugins/erp/includes/Admin/views/modules.php
    • > /wp-content/plugins/erp/includes/Admin/views/add-ons.php
    • > /wp-content/plugins/erp/vendor/illuminate/pagination/resources/views/default.blade.php
    • > /wp-content/plugins/erp/vendor/illuminate/pagination/resources/views/bootstrap-4.blade.php
    • > /wp-content/plugins/erp/vendor/illuminate/pagination/resources/views/simple-default.blade.php
  • 1711× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught LogicException: You cannot use "Http\\Message\\MessageFactory\\DiactorosMessageFactory" as the "php-http/message-factory" package is not installed. Try running "composer require php-http/message-factory". Note that this package is deprecated, use "psr/http-factory" instead in wp-content/plugins/erp/vendor/php-http/message/src/MessageFactory/DiactorosMessageFactory.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WeDevs\\ERP\\Email' not found in wp-content/plugins/erp/modules/hrm/includes/Emails/NewLeaveRequest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\Http\\Header\\MultipleHeaderInterface' not found in wp-content/plugins/erp/vendor/zendframework/zend-http/src/Header/WWWAuthenticate.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WeDevs\\ERP\\CRM\\Contact' not found in wp-content/plugins/erp/modules/crm/views/js-templates/customer-email-note.php:4
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/erp/includes/Updates/update-1.5.0.php on line 106
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/erp/vendor/php-http/message/src/Authentication/Header.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Event\\SubscriberInterface' not found in wp-content/plugins/erp/vendor/google/auth/src/Subscriber/AuthTokenSubscriber.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/erp/i18n/states/NZ.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/erp/vendor/symfony/options-resolver/Exception/MissingOptionsException.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/erp/i18n/states/PE.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 16 tag instead of maximum 10
Please take inspiration from this readme.txt

erp/wp-erp.php 92% from 13 tests

The primary PHP file in "WP ERP | Complete HR solution with recruitment & job listings | WooCommerce CRM & Accounting" version 1.12.7 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("erp.php" instead of "wp-erp.php")

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/erp/vendor/nesbot/carbon/bin/carbon.bat
429,127 lines of code in 3,233 files:
LanguageFilesBlank linesComment linesLines of code
PHP2,83551,724130,668263,772
JavaScript12316,87126,221132,042
CSS4086434610,923
Markdown1004,344010,269
JSON61006,381
XSD392482,803
SVG412231,985
XML63553314
YAML12494250
Blade51119136
Sass150126
reStructuredText1747875
Bourne Shell13431
Dockerfile18010
INI2016
DOS Batch1004

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.23
▷ Minimum class complexity1.00
▷ Maximum class complexity634.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces268
Interfaces220
Traits78
Classes1,531
▷ Abstract classes664.31%
▷ Concrete classes1,46595.69%
▷ Final classes20013.65%
Methods13,332
▷ Static methods1,60212.02%
▷ Public methods11,15283.65%
▷ Protected methods1,46210.97%
▷ Private methods7185.39%
Functions2,262
▷ Named functions1,20053.05%
▷ Anonymous functions1,06246.95%
Constants1,110
▷ Global constants14212.79%
▷ Class constants96887.21%
▷ Public constants95398.45%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
98 PNG files occupy 1.07MB with 0.48MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wperp-settings/woocommerce.png0.73KB0.63KB▼ 14.63%
assets/images/wperp-addons/banner-image.png98.71KB31.85KB▼ 67.73%
assets/images/one-by-one-pixel.png0.15KB0.09KB▼ 37.09%
assets/images/modules/reimbursement.png5.62KB2.81KB▼ 49.92%
assets/images/modules/payroll.png5.66KB2.68KB▼ 52.55%