68% cf7-salesmate-integration

Code Review | Salesmate Integration for Contact Form 7

WordPress plugin Salesmate Integration for Contact Form 7 scored68%from 54 tests.

About plugin

  • Plugin page: cf7-salesmate-int...
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Sep 22, 2023
  • Number of updates: 41
  • Update frequency: every 47.6 days
  • Top authors: salesmate (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /2,216 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.45ms] Passed 4 tests

An overview of server-side resources used by Salesmate Integration for Contact Form 7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.00 ▼3.86
Dashboard /wp-admin3.31 ▲0.0042.59 ▼4.83
Posts /wp-admin/edit.php3.36 ▲0.0043.46 ▼1.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.79 ▼15.77
Media Library /wp-admin/upload.php3.23 ▲0.0033.89 ▲0.02

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 13 new files
Database: 1 new table, 6 new options
New tables
wp_salesmatelogs
New WordPress options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Salesmate Integration for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.39 ▼1.171.75 ▼0.6543.62 ▼8.06
Dashboard /wp-admin2,209 ▲215.86 ▼0.03101.85 ▲2.4340.83 ▼5.75
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0038.29 ▲2.5131.44 ▼5.20
Add New Post /wp-admin/post-new.php1,514 ▼2217.68 ▼5.51637.34 ▲40.2058.93 ▼1.20
Media Library /wp-admin/upload.php1,388 ▲34.19 ▲0.0096.06 ▼10.6741.48 ▼0.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_salesmatelogs
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cf7-salesmate-integration/templates/settings-footer.php
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/cf7-salesmate-integration/templates/salesmatelogs.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/cf7-salesmate-integration/templates/settings-general.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/cf7-salesmate-integration/templates/settings-head.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/cf7-salesmate-integration/templates/mapsalesmatefields.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: crm, best crm, salesmate, salesmate crm, contact form7 addon

cf7-salesmate-integration/cf7-salesmate.php 85% from 13 tests

The main PHP file in "Salesmate Integration for Contact Form 7" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("cf7-salesmate-integration.php" instead of "cf7-salesmate.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,256 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92142091,164
JavaScript14278
CSS10014

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for 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.51
Average class complexity69.00
▷ Minimum class complexity4.00
▷ Maximum class complexity112.00
Average method complexity6.88
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods38.57%
▷ Private methods25.71%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin