60% zero-bs-crm

Code Review | Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation

WordPress plugin Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation scored60%from 54 tests.

About plugin

Code review

54 tests

User reviews

134 reviews

Install metrics

40,000+ active /1,210,345 total downloads

Benchmarks

Plugin footprint 63% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲13.02MB] [CPU: ▲150.95ms] 25% from 4 tests

A check of server-side resources used by Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation
Please fix the following
  • RAM: The total memory usage must be kept under 10MB (currently 16.42MB on /wp-admin/admin.php?page=manage-segments)
  • CPU: Total CPU usage must kept under 500.00ms (currently 754.12ms on /wp-admin/admin.php?page=zerobscrm-extensions)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 13.02MB on /wp-admin/admin.php?page=manage-segments)
PageMemory (MB)CPU Time (ms)
Home /16.10 ▲12.64227.89 ▲184.15
Dashboard /wp-admin16.48 ▲13.18184.36 ▲134.29
Posts /wp-admin/edit.php16.54 ▲13.18211.11 ▲164.21
Add New Post /wp-admin/post-new.php18.99 ▲13.11239.39 ▲150.21
Media Library /wp-admin/upload.php16.38 ▲13.15189.66 ▲155.07
Quotes /wp-admin/admin.php?page=manage-quotes16.31173.46
Team /wp-admin/admin.php?page=zerobscrm-team16.51678.74
Dashboard /wp-admin/admin.php?page=zerobscrm-dash16.46201.98
CRM Settings /wp-admin/admin.php?page=zerobscrm-plugin-settings16.67214.39
Contacts /wp-admin/admin.php?page=manage-customers16.42206.67
System Assistant /wp-admin/admin.php?page=zerobscrm-systemstatus19.12292.16
Extensions /wp-admin/admin.php?page=zerobscrm-extensions16.51754.12
Welcome /wp-admin/admin.php?page=zerobscrm-plugin16.42186.54
Export Tools /wp-admin/admin.php?page=zbs-export-tools16.42237.48
Segments /wp-admin/admin.php?page=manage-segments16.42200.62

Server storage [IO: ▲34.79MB] [DB: ▲0.08MB] 33% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 21 files (1,646.68KB) illegally modified outside of "wp-content/plugins/zero-bs-crm/" and "wp-content/uploads/"
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-BoldItalic.ttf
    • (new file) wp-content/jpcrm-storage/fonts/.htaccess
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-Italic.ufm
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-Bold.ttf
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-Regular.ufm
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-Bold.ufm
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-BoldItalic.ufm
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-Regular.ttf
    • (new file) wp-content/jpcrm-storage/fonts/NotoSans-Italic.ttf
    • (new file) wp-content/jpcrm-storage/fonts/fonts-info.txt
    • ...
  • Total filesystem usage must be limited to 25MB (currently using 34.79MB)
Filesystem: 1,369 new files
Database: 34 new tables, 8 new options
New tables
wp_zbs_tags_links
wp_zbs_event_reminders
wp_zbs_invoices
wp_zbs_object_links
wp_zbs_quotes
wp_zbs_admlog
wp_zbs_dbmigration_meta
wp_zbs_companies
wp_zbs_notifications
wp_zbs_sys_email
...
New WordPress options
widget_recent-posts
widget_zbs_form_widget
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
zbs_wizard_run
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,100 ▲35314.94 ▲0.564.74 ▲2.8539.87 ▼2.08
Dashboard /wp-admin2,439 ▲2626.27 ▲0.74122.09 ▲19.0243.43 ▼12.39
Posts /wp-admin/edit.php2,372 ▲2693.64 ▲1.6753.59 ▲16.7436.88 ▼0.90
Add New Post /wp-admin/post-new.php1,647 ▲12123.93 ▲0.89665.77 ▼81.0532.87 ▼30.77
Media Library /wp-admin/upload.php1,507 ▲1104.20 ▼0.0182.05 ▼24.4941.99 ▼2.72
Quotes /wp-admin/admin.php?page=manage-quotes1,5531.8731.51118.59
Team /wp-admin/admin.php?page=zerobscrm-team2,3055.0697.7585.53
Dashboard /wp-admin/admin.php?page=zerobscrm-dash2,9246.21124.2878.16
CRM Settings /wp-admin/admin.php?page=zerobscrm-plugin-settings3,0785.0382.2688.51
Contacts /wp-admin/admin.php?page=manage-customers2,5835.9490.18113.19
System Assistant /wp-admin/admin.php?page=zerobscrm-systemstatus6,9674.9782.93142.74
Extensions /wp-admin/admin.php?page=zerobscrm-extensions2,6365.1280.14160.10
Welcome /wp-admin/admin.php?page=zerobscrm-plugin2,4374.8367.02133.94
Export Tools /wp-admin/admin.php?page=zbs-export-tools2,1874.7880.42114.65
Segments /wp-admin/admin.php?page=manage-segments2,4145.3693.4758.96

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 34 tables
    • wp_zbs_segments
    • wp_zbs_dbmigration_meta
    • wp_zbs_aka
    • wp_zbs_contacts
    • wp_zbs_security_log
    • wp_zbs_sys_cronmanagerlogs
    • wp_zbs_companies
    • wp_zbs_customfields
    • wp_zbs_sys_email_hist
    • wp_zbs_tracking
    • ...
  • Zombie WordPress options were found after uninstall: 8 options
    • db_upgraded
    • widget_zbs_form_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • zbs_wizard_run
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/zero-bs-crm/vendor/masterminds/html5/bin/entities.php
  • 214× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Dompdf\\Frame' not found in wp-content/plugins/zero-bs-crm/vendor/dompdf/dompdf/src/FrameDecorator/AbstractFrameDecorator.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Sabberworm\\CSS\\Value\\RuleValueList' not found in wp-content/plugins/zero-bs-crm/vendor/sabberworm/php-css-parser/src/Value/CalcRuleValueList.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zero-bs-crm/includes/ZeroBSCRM.PluginAdminNotices.php:66
    • > PHP Fatal error
      Uncaught Error: Class 'FontLib\\TrueType\\File' not found in wp-content/plugins/zero-bs-crm/vendor/phenx/php-font-lib/src/FontLib/OpenType/File.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\CRM\\Automation\\Base_Action' not found in wp-content/plugins/zero-bs-crm/src/automation/commons/actions/transactions/class-set-transaction-status.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\CRM\\Automation\\Base_Trigger' not found in wp-content/plugins/zero-bs-crm/src/automation/commons/triggers/invoices/class-invoice-updated.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Masterminds\\HTML5\\Parser\\InputStream' not found in wp-content/plugins/zero-bs-crm/vendor/masterminds/html5/src/HTML5/Parser/StringInputStream.php:46
    • > PHP Fatal error
      Uncaught Error: Class 'Svg\\Tag\\AbstractTag' not found in wp-content/plugins/zero-bs-crm/vendor/phenx/php-svg-lib/src/Svg/Document.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\CRM\\Automation\\Base_Condition' not found in wp-content/plugins/zero-bs-crm/src/automation/commons/conditions/transactions/class-transaction-field.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Automattic\\Jetpack\\CRM\\Entities\\Factories\\Entity_Factory' not found in wp-content/plugins/zero-bs-crm/src/entities/factories/class-task-factory.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=zerobscrm-team
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=zerobscrm-team 464:45 Uncaught SyntaxError: Unexpected token '{'

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (12 tag instead of maximum 10)
The official readme.txt is a good inspiration

zero-bs-crm/ZeroBSCRM.php 92% from 13 tests

"Jetpack CRM - Clients, Leads, Invoices, Billing, Email Marketing, & Automation" version 6.3.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("zero-bs-crm.php" instead of "ZeroBSCRM.php")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin353,025 lines of code in 1,052 files:
LanguageFilesBlank linesComment linesLines of code
CSS17627,06421,036167,557
PHP59350,62060,901128,979
JavaScript1603,5908,66429,713
PO File35,5828,86712,738
SVG90135,668
Markdown2070702,337
Sass23430431,900
TypeScript34226491,627
HTML1668261,255
JSON13001,140
JSX411485
XML10026

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,183)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 207)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity34.62
▷ Minimum class complexity1.00
▷ Maximum class complexity1,183.00
Average method complexity4.70
▷ Minimum method complexity1.00
▷ Maximum method complexity207.00
Code structure
Namespaces57
Interfaces16
Traits0
Classes430
▷ Abstract classes235.35%
▷ Concrete classes40794.65%
▷ Final classes51.23%
Methods4,175
▷ Static methods46611.16%
▷ Public methods3,47583.23%
▷ Protected methods49211.78%
▷ Private methods2084.98%
Functions1,433
▷ Named functions1,36895.46%
▷ Anonymous functions654.54%
Constants344
▷ Global constants8424.42%
▷ Class constants26075.58%
▷ Public constants25598.08%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
169 PNG files occupy 2.29MB with 0.54MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
i/ext/system-email.png6.32KB3.13KB▼ 50.43%
i/filetypes/php.png1.47KB1.38KB▼ 6.42%
i/filetypes/py.png1.46KB1.41KB▼ 3.55%
i/filetypes/tgz.png1.69KB1.52KB▼ 9.85%
i/customers.png7.97KB4.11KB▼ 48.46%