66% crm-service-wp-forms

Code Review | CRM-service WP Forms

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

About plugin

  • Plugin page: crm-service-wp-forms
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.3
  • WordPress version: 5.8.1
  • First release: May 11, 2018
  • Latest release: Jan 31, 2020
  • Number of updates: 17
  • Update frequency: every 37.2 days
  • Top authors: crmservice (52.94%)deployer (41.18%)sippis (17.65%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 819 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: ▼1.61MB] [CPU: ▼189.64ms] 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 /2.02 ▼0.708.52 ▼13.66
Dashboard /wp-admin2.04 ▼1.019.40 ▼38.07
Posts /wp-admin/edit.php2.04 ▼1.069.86 ▼35.52
Add New Post /wp-admin/post-new.php2.04 ▼3.399.48 ▼658.39
Media Library /wp-admin/upload.php2.04 ▼0.979.89 ▼26.56
Settings /wp-admin/edit.php?post_type=crmservice_form&page=crmservice2.049.36
CRM-service /wp-admin/edit.php?post_type=crmservice_form2.049.45
Add new form integration /wp-admin/post-new.php?post_type=crmservice_form2.049.48

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 32 new files
Database: no new tables, no new options

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 /3,725 ▲11916.20 ▲0.697.18 ▼1.2345.19 ▼0.85
Dashboard /wp-admin3,007 ▲765.91 ▼0.10142.62 ▲5.00115.56 ▼8.46
Posts /wp-admin/edit.php2,803 ▲672.68 ▼0.0160.18 ▼6.4992.97 ▼0.15
Add New Post /wp-admin/post-new.php1,530 ▼14218.84 ▼0.24383.46 ▲13.73111.18 ▼1.10
Media Library /wp-admin/upload.php1,798 ▼94.97 ▼0.06125.92 ▼36.92145.20 ▲21.42
Settings /wp-admin/edit.php?post_type=crmservice_form&page=crmservice1,1872.1253.0680.97
CRM-service /wp-admin/edit.php?post_type=crmservice_form1,4832.3856.2074.07
Add new form integration /wp-admin/post-new.php?post_type=crmservice_form1,4832.3356.8473.84

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/crm-service-wp-forms/classes/class-helper.php+88
    Trying to access array offset on value of type bool

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=crmservice_form
    • > Notice in wp-content/plugins/crm-service-wp-forms/classes/class-helper.php+88
    Trying to access array offset on value of type bool

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,regenerator-runtime,wp-polyfill,wp-hooks&ver=5.8.1 2:1787 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=5f1269854226b4dd90450db411a12b79 1:9546 Uncaught TypeError: Cannot read properties of undefined (reading 'defaultHooks')
  • 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 273:8 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
  • 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 279:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
  • 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=5.8.1 1:69 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
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=crmservice_form 292:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
  • 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 304:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
  • 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=5.8.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-admin/edit.php?post_type=crmservice_form 312:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
  • 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 325:9 Uncaught TypeError: Cannot read properties of undefined (reading 'setLocaleData')
  • 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=0ac8327cc1c40dcfdf29716affd7ac63 1:1994 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=5.8.1 1:31592 "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=5.8.1:2:1194)\n at d (/wp-includes/js/heartbeat.min.js?ver=5.8.1:2:2732)\n at Object.I [as interval] (/wp-includes/js/heartbeat.min.js?ver=5.8.1:2:3937)\n at HTMLDocument.\u003Canonymous> (/wp-admin/js/inline-edit-post.min.js?ver=5.8.1:2:6543)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.8.1:2:30340)" 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=5.8.1 1:31702 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, crm service, crm-service

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

The principal PHP file in "CRM-service WP Forms" v. 1.2.2 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,743 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP165751,0652,161
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 complexity15.90
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces11
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods118
▷ Static methods9277.97%
▷ Public methods10488.14%
▷ Protected methods32.54%
▷ Private methods119.32%
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%