10% idcrm-contacts-companies

Code Review | id:CRM Contacts & Companies

WordPress plugin id:CRM Contacts & Companies scored10%from 54 tests.

About plugin

  • Plugin page: idcrm-contacts-co...
  • Plugin version: 2.1.16
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8.1-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 25, 2021
  • Latest release: Oct 12, 2023
  • Number of updates: 135
  • Update frequency: every 5.2 days
  • Top authors: idresult (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,646 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Warning in wp-content/plugins/idcrm-contacts-companies/includes/lib/idcrm-activation-media.php+22
    unlink(/tmp/logo_idresult_kv-6FsSuP.tmp): No such file or directory

Server metrics [RAM: ▲1.16MB] [CPU: ▲13.64ms] Passed 4 tests

Server-side resources used by id:CRM Contacts & Companies
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.65 ▲1.1865.00 ▲23.78
Dashboard /wp-admin4.47 ▲1.1671.12 ▲22.41
Posts /wp-admin/edit.php4.58 ▲1.2262.61 ▲14.30
Add New Post /wp-admin/post-new.php7.08 ▲1.18102.34 ▲3.37
Media Library /wp-admin/upload.php4.36 ▲1.1348.91 ▲14.46
Event Types /wp-admin/edit-tags.php?taxonomy=contact_events4.4252.22
Add Event /wp-admin/post-new.php?post_type=contact_event4.5160.70
Contacts /wp-admin/edit.php?post_type=user_contact4.5863.45
Contacts Statuses /wp-admin/edit-tags.php?taxonomy=user_status4.4255.05
Companies Statuses /wp-admin/edit-tags.php?taxonomy=comp_status4.4251.85
Add company /wp-admin/post-new.php?post_type=company4.5265.86
Schedule /wp-admin/edit.php?post_type=contact_event4.4652.11
Add contact /wp-admin/post-new.php?post_type=user_contact4.5367.15
Contacts Sources /wp-admin/edit-tags.php?taxonomy=user_source4.3857.85
Companies /wp-admin/edit.php?post_type=company4.5856.26

Server storage [IO: ▲14.33MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 774 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
comp_status_children
widget_theysaidso_widget
can_compress_scripts
contact_events_children
widget_recent-comments
theysaidso_admin_options
user_status_children
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by id:CRM Contacts & Companies
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,190 ▲42916.29 ▲1.9424.75 ▲23.1640.66 ▼0.65
Dashboard /wp-admin2,419 ▲2456.45 ▲0.79107.17 ▲18.8536.32 ▼8.44
Posts /wp-admin/edit.php2,350 ▲2503.63 ▲1.5258.83 ▲25.9135.05 ▼1.68
Add New Post /wp-admin/post-new.php1,604 ▲7023.42 ▲5.30592.07 ▼42.1233.32 ▼50.37
Media Library /wp-admin/upload.php1,524 ▲1274.57 ▲0.3883.61 ▼14.3640.31 ▼4.47
Event Types /wp-admin/edit-tags.php?taxonomy=contact_events1,8543.5941.8233.91
Add Event /wp-admin/post-new.php?post_type=contact_event2,8858.04195.8174.77
Contacts /wp-admin/edit.php?post_type=user_contact2,1183.6248.3430.71
Contacts Statuses /wp-admin/edit-tags.php?taxonomy=user_status1,6853.3746.1732.59
Companies Statuses /wp-admin/edit-tags.php?taxonomy=comp_status1,6793.4844.7232.95
Add company /wp-admin/post-new.php?post_type=company2,9737.92175.6162.36
Schedule /wp-admin/edit.php?post_type=contact_event1,4223.5749.0429.29
Add contact /wp-admin/post-new.php?post_type=user_contact3,1678.12218.3165.16
Contacts Sources /wp-admin/edit-tags.php?taxonomy=user_source1,4993.3650.1932.74
Companies /wp-admin/edit.php?post_type=company1,9813.5848.8927.14

Uninstaller [IO: ▲0.06MB] [DB: ▲0.01MB] 75% from 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 9 options
    • widget_recent-comments
    • contact_events_children
    • widget_theysaidso_widget
    • comp_status_children
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • user_status_children
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=user_contact
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/idcrm-contacts-companies/admin/partials/idcrm-contacts-admin-display.php
    • > /wp-content/plugins/idcrm-contacts-companies/public/partials/idcrm-contacts-public-display.php
    • > /wp-content/plugins/idcrm-contacts-companies/templates/template-parts/archive-contacts-event.php
  • 46× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/idcrm-contacts-companies/includes/actions/idcrm-action-menu.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/idcrm-contacts-companies/templates/inc/check-user.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/idcrm-contacts-companies/templates/inc/schedule-loop.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/idcrm-contacts-companies/templates/inc/footer.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_user_logged_in() in wp-content/plugins/idcrm-contacts-companies/templates/crm.php:11
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/idcrm-contacts-companies/templates/inc/header.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/idcrm-contacts-companies/includes/idcrm-settings.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/idcrm-contacts-companies/templates/inc/content-schedule-form.php:10
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/idcrm-contacts-companies/includes/actions/idcrm-action-menu.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/idcrm-contacts-companies/templates/inc/check-user.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Screenshot #5 (https://youtu.be/MH9uepKJNKs) image missing
The official readme.txt is a good inspiration

idcrm-contacts-companies/idcrm-contacts.php 92% from 13 tests

"id:CRM Contacts & Companies" version 2.1.16's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("idcrm-contacts-companies.php" instead of "idcrm-contacts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin268,375 lines of code in 746 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript56022,43515,581229,720
CSS251,66421715,074
Sass641,05688311,936
PHP781,2807337,548
SVG9081,413
LESS11877758
Markdown43490630
TypeScript212687543
PO File1248346542
JSON200211

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity14.27
▷ Minimum class complexity1.00
▷ Maximum class complexity94.00
Average method complexity3.34
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes45
▷ Abstract classes00.00%
▷ Concrete classes45100.00%
▷ Final classes00.00%
Methods216
▷ Static methods8338.43%
▷ Public methods18284.26%
▷ Protected methods41.85%
▷ Private methods3013.89%
Functions29
▷ Named functions2275.86%
▷ Anonymous functions724.14%
Constants35
▷ Global constants514.29%
▷ Class constants3085.71%
▷ Public constants30100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
6 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/images/logo-text.png4.67KB3.49KB▼ 25.30%
templates/images/logo-light-text.png5.30KB3.98KB▼ 24.95%
templates/images/custom-select.png14.64KB0.15KB▼ 98.97%
templates/images/logo-text-crm.png4.47KB3.41KB▼ 23.79%
templates/images/logo-icon.png5.58KB2.03KB▼ 63.68%