72% crm-service-wp-forms

Code Review | CRM-service WP Forms

WordPress plugin CRM-service WP Forms scored72%from 54 tests.

About plugin

  • Plugin page: crm-service-wp-forms
  • Plugin version: 1.4.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: May 11, 2018
  • Latest release: Sep 8, 2023
  • Number of updates: 32
  • Update frequency: every 60.9 days
  • Top authors: sippis (56.25%)crmservice (28.13%)deployer (21.88%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,632 total downloads

Benchmarks

Plugin footprint 83% 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.06MB] [CPU: ▼9.22ms] Passed 4 tests

This is a short check of server-side resources used by CRM-service WP Forms
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0540.07 ▲3.13
Dashboard /wp-admin3.42 ▲0.0848.83 ▼11.31
Posts /wp-admin/edit.php3.48 ▲0.1246.46 ▼2.32
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.48 ▼21.88
Media Library /wp-admin/upload.php3.28 ▲0.0633.88 ▼1.38
CRM-service /wp-admin/edit.php?post_type=crmservice_form3.3336.37
Settings /wp-admin/edit.php?post_type=crmservice_form&page=crmservice3.3033.33
Add new form integration /wp-admin/post-new.php?post_type=crmservice_form3.2938.48

Server storage [IO: ▲0.52MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for CRM-service WP Forms
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲7814.35 ▲0.001.75 ▲0.0444.03 ▲4.01
Dashboard /wp-admin2,218 ▲405.53 ▼0.1483.26 ▼23.7679.37 ▲41.23
Posts /wp-admin/edit.php2,136 ▲362.00 ▲0.0534.08 ▼6.8034.76 ▼0.98
Add New Post /wp-admin/post-new.php1,560 ▲2423.16 ▲4.73727.96 ▲38.4757.99 ▼20.04
Media Library /wp-admin/upload.php1,438 ▲384.21 ▼0.0396.53 ▼13.9772.56 ▲23.97
CRM-service /wp-admin/edit.php?post_type=crmservice_form1,1162.1328.0030.18
Settings /wp-admin/edit.php?post_type=crmservice_form&page=crmservice9172.0424.4224.67
Add new form integration /wp-admin/post-new.php?post_type=crmservice_form1,1192.0426.7732.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/crm-service-wp-forms/views/admin/notice.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Notice
      Undefined variable: classes in wp-content/plugins/crm-service-wp-forms/views/admin/notice.php on line 14
    • > PHP Notice
      Undefined variable: text_string in wp-content/plugins/crm-service-wp-forms/views/admin/notice.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/crm-service-wp-forms/inc/connector.php:219

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=hoverIntent,wp-polyfill-inert,regenerator-runtime,wp-polyfill,wp-hooks&ver=6.3.1 3:1808 Uncaught TypeError: Cannot set properties of undefined (setting 'wrap')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-includes/js/dist/i18n.min.js?ver=7701b0c3857f914212ef 1:9103 Uncaught TypeError: Cannot read properties of undefined (reading 'hooks')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=crmservice_form 275:0 Uncaught ReferenceError: wp is not defined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-admin/js/common.min.js?ver=6.3.1 1:61 Uncaught ReferenceError: wp is not defined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-admin/js/tags-suggest.min.js?ver=6.3.1 1:123 Uncaught TypeError: Cannot read properties of undefined (reading '_x')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-includes/js/dist/a11y.min.js?ver=7032343a947cfccf5608 1:1445 Uncaught TypeError: Cannot read properties of undefined (reading '__')
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'doAction')" "TypeError: Cannot read properties of undefined (reading 'doAction')\n at l (/wp-includes/js/heartbeat.min.js?ver=6.3.1:2:1194)\n at m (/wp-includes/js/heartbeat.min.js?ver=6.3.1:2:2732)\n at Object.I [as interval] (/wp-includes/js/heartbeat.min.js?ver=6.3.1:2:3937)\n at HTMLDocument.\u003Canonymous> (/wp-admin/js/inline-edit-post.min.js?ver=6.3.1:2:7665)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'doAction')

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: crm-service, crm service, crm

crm-service-wp-forms/crm-service.php 77% from 13 tests

The principal PHP file in "CRM-service WP Forms" v. 1.4.4 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("crm-service-wp-forms.php" instead of "crm-service.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin2,929 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP176201,1032,347
Sass1601325
JavaScript24026164
SVG43392
CSS1001

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.42
Average class complexity16.52
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity3.64
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces12
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods125
▷ Static methods9777.60%
▷ Public methods11088.00%
▷ Protected methods43.20%
▷ Private methods118.80%
Functions8
▷ Named functions337.50%
▷ Anonymous functions562.50%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/admin/icon.png21.42KB4.95KB▼ 76.90%