68% catalyst-connect-client-portal

Code Review | Catalyst Connect Zoho CRM Client Portal

WordPress plugin Catalyst Connect Zoho CRM Client Portal scored68%from 54 tests.

About plugin

  • Plugin page: catalyst-connect-...
  • Plugin version: 2.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 1, 2020
  • Latest release: Jun 7, 2023
  • Number of updates: 13
  • Update frequency: every 82.7 days
  • Top authors: catalyst2020 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,431 total downloads

Benchmarks

Plugin footprint 65% 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: ▲0.54MB] [CPU: ▼6.42ms] Passed 4 tests

Server-side resources used by Catalyst Connect Zoho CRM Client Portal
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5042.93 ▼0.27
Dashboard /wp-admin3.92 ▲0.6250.62 ▼1.43
Posts /wp-admin/edit.php3.93 ▲0.5752.81 ▲4.78
Add New Post /wp-admin/post-new.php6.48 ▲0.5978.65 ▼26.51
Media Library /wp-admin/upload.php3.73 ▲0.5039.17 ▲2.55

Server storage [IO: ▲6.28MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 219 new files
Database: 4 new tables, 6 new options
New tables
ccgclientportal_auth
ccgclientportal_users
ccgclientportal_options
ccgclientportal_tempusers
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Catalyst Connect Zoho CRM Client Portal
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,217 ▲45616.20 ▲1.9314.84 ▲13.2040.90 ▲1.69
Dashboard /wp-admin2,414 ▲2426.74 ▲1.01113.62 ▲12.02102.38 ▲61.29
Posts /wp-admin/edit.php2,357 ▲2573.62 ▲1.6751.54 ▲15.6762.71 ▲30.37
Add New Post /wp-admin/post-new.php1,605 ▲7418.96 ▼4.26601.45 ▼31.8336.04 ▼24.16
Media Library /wp-admin/upload.php1,495 ▲924.70 ▲0.5488.16 ▼10.8981.14 ▲36.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie tables were found after uninstall: 4 tables
    • ccgclientportal_auth
    • ccgclientportal_tempusers
    • ccgclientportal_options
    • ccgclientportal_users
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
  • 9× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/admin/crm_modules/footer.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/admin/crm_modules/action_Layouts/common.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/user/login/resetpassword.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/admin/crm_modules/icon-list.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/user/common/header.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/user/common/footer.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/admin/settings/webtab.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/admin/usersManagement/details/footer.php
    • > /wp-content/plugins/catalyst-connect-client-portal/pages/admin/common/footer.php
  • 194× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      Use of undefined constant CCGP_PLUGIN_URL - assumed 'CCGP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/catalyst-connect-client-portal/pages/admin/usersManagement/details/header.php on line 4
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/catalyst-connect-client-portal/pages/user/crm_modules/defineInputTypeAdd.php on line 45
    • > PHP Notice
      Undefined variable: type in wp-content/plugins/catalyst-connect-client-portal/pages/user/crm_modules/defineInputTypeEdit.php on line 8
    • > PHP Notice
      Undefined variable: _SESSION in wp-content/plugins/catalyst-connect-client-portal/pages/user/crm_modules/list.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/catalyst-connect-client-portal/pages/admin/zohocrmapi/crmapiinformation.php:5
    • > PHP Notice
      Undefined variable: portalTitle in wp-content/plugins/catalyst-connect-client-portal/pages/user/login/login.php on line 12
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/catalyst-connect-client-portal/pages/admin/usersManagement/inactiveUsers.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/catalyst-connect-client-portal/pages/admin/crm_modules/action_Layouts/desk/_viewLayout.php:10
    • > PHP Notice
      Undefined variable: pluginUrl in wp-content/plugins/catalyst-connect-client-portal/pages/admin/crm_modules/action_Layouts/common.php on line 91
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/catalyst-connect-client-portal/pages/user/common/left-menu.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
8 plugin tags: client portal, zoho crm, zoho, zoho one, catalyst connect...

catalyst-connect-client-portal/CCGClientPortalFree.php 85% from 13 tests

"Catalyst Connect Zoho CRM Client Portal" version 2.2.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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 156 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("catalyst-connect-client-portal.php" instead of "CCGClientPortalFree.php")

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
There were no executable files found in this plugin41,900 lines of code in 114 files:
LanguageFilesBlank linesComment linesLines of code
PHP835,29580426,069
SVG30128,891
CSS174361995,109
JavaScript85832161,776
Markdown226044
YAML10011

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity25.50
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.71
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods144
▷ Static methods10.69%
▷ Public methods14197.92%
▷ Protected methods00.00%
▷ Private methods32.08%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
73 PNG files occupy 0.83MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/nicon/portal-frontend-icons-52.png9.09KB4.41KB▼ 51.45%
assets/plugin/colorbox/images/loading_background.png0.13KB0.15KB0.00%
pages/user/attachments/profilepic/4039853000000351001/profile.png45.01KB17.63KB▼ 60.82%
assets/images/profile-image-m.png5.75KB3.00KB▼ 47.79%
assets/images/icon/Docs-48.png12.21KB3.73KB▼ 69.49%