54% crm-erp-business-solution

Code Review | CRM ERP Business Solution for freelancers & SME

WordPress plugin CRM ERP Business Solution for freelancers & SME scored54%from 54 tests.

About plugin

  • Plugin page: crm-erp-business-...
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.2
  • WordPress version: 6.3.1
  • First release: Mar 5, 2021
  • Latest release: Jul 13, 2023
  • Number of updates: 33
  • Update frequency: every 26.1 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /4,022 total downloads

Benchmarks

Plugin footprint 30% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲2.80MB] [CPU: ▲7.42ms] Passed 4 tests

This is a short check of server-side resources used by CRM ERP Business Solution for freelancers & SME
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.21 ▲2.7552.24 ▲12.08
Dashboard /wp-admin6.14 ▲2.7963.01 ▲3.58
Posts /wp-admin/edit.php6.20 ▲2.8468.13 ▲12.07
Add New Post /wp-admin/post-new.php8.85 ▲2.97106.81 ▲1.93
Media Library /wp-admin/upload.php6.07 ▲2.8463.12 ▲29.62
Sales /wp-admin/admin.php?page=crm-erp-business-solution&tab=sales6.0755.24
Offers /wp-admin/admin.php?page=crm-erp-business-solution&tab=offers6.0749.38
Appointments /wp-admin/edit.php?post_type=crmerpbs_app6.1457.40
CRM ERP /wp-admin/admin.php?page=crm-erp-business-solution6.0146.51
Vendors /wp-admin/admin.php?page=crm-erp-business-solution&tab=vendors6.0956.30
Reports /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports6.0167.12
Payments /wp-admin/admin.php?page=crm-erp-business-solution&tab=payments6.0756.86
Customers /wp-admin/admin.php?page=crm-erp-business-solution&tab=customers6.0953.25
Settings /wp-admin/admin.php?page=crm-erp-business-solution&tab=settings6.1762.72

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 88 new files
Database: 3 new tables, 19 new options
New tables
wp_crmerpbs_transaction_items
wp_crmerpbs_transactions
wp_crmerpbs_documents
New WordPress options
crmerpbs_enableEmails
crmerpbs_documents_table_db_version
crmerpbs_enableAppointments
crmerpbs_enableTickets
widget_recent-comments
widget_recent-posts
crmerpbs_enableActions
crmerpbs_thankyouColor
crmerpbs_enableProducts
crmerpbs_enableOffers
...

Browser metrics Passed 4 tests

CRM ERP Business Solution for freelancers & SME: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲16815.26 ▲0.891.61 ▼0.4037.21 ▼6.77
Dashboard /wp-admin2,305 ▲1177.15 ▲2.25135.35 ▲22.7890.93 ▲48.59
Posts /wp-admin/edit.php2,211 ▲1433.96 ▲1.9558.69 ▲19.5574.07 ▲38.16
Add New Post /wp-admin/post-new.php1,615 ▲8024.38 ▲1.26709.82 ▲14.1135.02 ▼21.23
Media Library /wp-admin/upload.php1,502 ▲1115.25 ▲1.09112.21 ▲11.1092.45 ▲48.98
Sales /wp-admin/admin.php?page=crm-erp-business-solution&tab=sales1,6203.4663.23100.27
Offers /wp-admin/admin.php?page=crm-erp-business-solution&tab=offers1,5373.4765.3574.30
Appointments /wp-admin/edit.php?post_type=crmerpbs_app2,0175.5898.9480.39
CRM ERP /wp-admin/admin.php?page=crm-erp-business-solution1,3754.19109.6675.96
Vendors /wp-admin/admin.php?page=crm-erp-business-solution&tab=vendors1,5503.9856.2971.29
Reports /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports1,3814.30119.4675.46
Payments /wp-admin/admin.php?page=crm-erp-business-solution&tab=payments1,6123.8249.6184.39
Customers /wp-admin/admin.php?page=crm-erp-business-solution&tab=customers1,5504.0557.1873.19
Settings /wp-admin/admin.php?page=crm-erp-business-solution&tab=settings3,85910.88212.82164.12

Uninstaller [IO: ▲4.75MB] [DB: ▲0.01MB] 0% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Error in wp-content/plugins/crm-erp-business-solution/crm-erp-business-solution.php+299
    Uncaught Error: Using $this when not in object context in wp-content/plugins/crm-erp-business-solution/crm-erp-business-solution.php:299
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): CrmErpSolution::onUninstall()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/includes/plugin.php(1269): do_action()
    #4 wp-admin/includes/plugin.php(960): uninstall_plugin()
  • The plugin did not uninstall successfully, leaving 88 files (4.75MB) in the plugin directory
    • (new file) css/images/ui-icons_555555_256x240.png
    • (new file) css/backend.css
    • (new file) css/fullcalendar.min.css
    • (new file) crm-erp-business-solution.php
    • (new file) css/images/ui-icons_777620_256x240.png
    • (new file) css/images/ui-icons_777777_256x240.png
    • (new file) css/images/ui-icons_444444_256x240.png
    • (new file) css/images/ui-icons_cc0000_256x240.png
    • (new file) class-main.php
    • (new file) css/font-awesome.min.css
    • ...
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_crmerpbs_documents
    • wp_crmerpbs_transactions
    • wp_crmerpbs_transaction_items
  • This plugin does not fully uninstall, leaving 20 options in the database
    • crmerpbs_headingsBackground
    • widget_recent-comments
    • crmerpbs_generalColor
    • crmerpbs_enableAppointments
    • crmerpbs_headingsColor
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • crmerpbs_enableProducts
    • can_compress_scripts
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports
    • > Notice in wp-content/plugins/crm-erp-business-solution/includes/crm-erp-reports.php+469
    Undefined variable: month
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports
    • > Notice in wp-content/plugins/crm-erp-business-solution/includes/crm-erp-reports.php+469
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports
    • > Notice in wp-content/plugins/crm-erp-business-solution/includes/crm-erp-reports.php+469
    Undefined variable: mon
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports
    • > Notice in wp-content/plugins/crm-erp-business-solution/includes/crm-erp-reports.php+135
    Undefined variable: extra
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports
    • > Warning in wp-content/plugins/crm-erp-business-solution/includes/crm-erp-reports.php+135
    array_merge(): Expected parameter 2 to be an array, null given
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=crm-erp-business-solution&tab=reports
    • > Warning in wp-content/plugins/crm-erp-business-solution/includes/crm-erp-reports.php+150
    Invalid argument supplied for foreach()

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: erp, business solution, woocommerce crm, customer relatioship, crm

crm-erp-business-solution/crm-erp-business-solution.php 85% from 13 tests

The entry point to "CRM ERP Business Solution for freelancers & SME" version 1.0.7 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Requires at least: The required version number must match the one declared in readme.txt ("3.0.1" instead of "2.2")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin22,860 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP293,04568313,486
JavaScript61,5834325,929
CSS5114721,743
PO File14926271,017
SVG100685

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity153.50
▷ Minimum class complexity42.00
▷ Maximum class complexity435.00
Average method complexity6.11
▷ Minimum method complexity1.00
▷ Maximum method complexity78.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods477
▷ Static methods112.31%
▷ Public methods39883.44%
▷ Protected methods7916.56%
▷ Private methods00.00%
Functions21
▷ Named functions1466.67%
▷ Anonymous functions733.33%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.15MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/crmerpbs.png16.75KB7.11KB▼ 57.55%
images/default.png14.13KB5.96KB▼ 57.80%
images/extendwp.png5.75KB3.37KB▼ 41.46%
css/images/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
images/woo.png4.63KB2.87KB▼ 37.97%