83% connect-cf-7-freshsales-crm

Code Review | Contact Form 7 - Freshsales CRM

WordPress plugin Contact Form 7 - Freshsales CRM scored83%from 54 tests.

About plugin

  • Plugin page: connect-cf-7-fres...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7.2
  • WordPress version: 6.3.1
  • First release: Feb 25, 2020
  • Latest release: Jun 17, 2021
  • Number of updates: 6
  • Update frequency: every 79.7 days
  • Top authors: Rakesh Rathore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /701 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.55ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 - Freshsales CRM
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0642.33 ▼6.85
Dashboard /wp-admin3.41 ▲0.0748.91 ▼3.71
Posts /wp-admin/edit.php3.53 ▲0.1349.09 ▼2.83
Add New Post /wp-admin/post-new.php6.00 ▲0.0783.46 ▼8.80
Media Library /wp-admin/upload.php3.34 ▲0.0740.83 ▲1.98
Configuration /wp-admin/admin.php?page=cf7_fs_go_configuration3.3032.73
Integration /wp-admin/admin.php?page=cf7_fs_go_integration3.3133.60

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
cf7_fs_go_modules

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 - Freshsales CRM
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.35 ▼0.001.65 ▼0.2743.61 ▲0.28
Dashboard /wp-admin2,222 ▲425.58 ▼0.0997.19 ▲5.0742.23 ▼0.07
Posts /wp-admin/edit.php2,127 ▲271.99 ▲0.0136.24 ▼1.4532.57 ▼9.22
Add New Post /wp-admin/post-new.php1,548 ▲2223.13 ▼0.06673.34 ▲42.4055.52 ▼3.32
Media Library /wp-admin/upload.php1,430 ▲304.16 ▲0.05109.96 ▼6.9247.94 ▲1.05
Configuration /wp-admin/admin.php?page=cf7_fs_go_configuration8382.0222.9526.37
Integration /wp-admin/admin.php?page=cf7_fs_go_integration8352.0022.3327.56

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/connect-cf-7-freshsales-crm/uninstall.php
    • > /wp-content/plugins/connect-cf-7-freshsales-crm/includes/functions.php
    • > /wp-content/plugins/connect-cf-7-freshsales-crm/cf7-freshsales.php
    • > /wp-content/plugins/connect-cf-7-freshsales-crm/includes/class-freshsales.php
    • > /wp-content/plugins/connect-cf-7-freshsales-crm/includes/admin/admin.php
    • > /wp-content/plugins/connect-cf-7-freshsales-crm/includes/includes.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention: You can take inspiration from this readme.txt

connect-cf-7-freshsales-crm/cf7-freshsales.php 85% from 13 tests

The principal PHP file in "Contact Form 7 - Freshsales CRM" v. 1.1.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 221 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("connect-cf-7-freshsales-crm.php" instead of "cf7-freshsales.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
Everything looks great! No dangerous files found in this plugin433 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP67745433

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected