68% lacrm-connector-for-contact-form7

Code Review | CF7 LACRM Connector

WordPress plugin CF7 LACRM Connector scored68%from 54 tests.

About plugin

  • Plugin page: lacrm-connector-f...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4.1-4.6
  • WordPress version: 6.3.1
  • First release: Sep 1, 2016
  • Latest release: Nov 20, 2016
  • Number of updates: 13
  • Update frequency: every 6.2 days
  • Top authors: westerndeal (61.54%)sooskriszta (46.15%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,284 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by CF7 LACRM Connector
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0041.66 ▲0.84
Dashboard /wp-admin3.31 ▲0.0045.48 ▼4.25
Posts /wp-admin/edit.php3.36 ▲0.0046.40 ▲0.89
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.60 ▼28.10
Media Library /wp-admin/upload.php3.23 ▲0.0038.66 ▲4.70
LACRM /wp-admin/admin.php?page=wpcf7-lacrm-config3.0032.16

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 9 new options
New tables
wp_lacrm_connector
New WordPress options
lacrm_api_token
can_compress_scripts
lacrm_verify_token
widget_theysaidso_widget
theysaidso_admin_options
lacrm_user_code
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for CF7 LACRM Connector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.121.84 ▲0.2345.09 ▲3.51
Dashboard /wp-admin2,198 ▲185.60 ▲0.0084.28 ▼6.1038.87 ▼0.67
Posts /wp-admin/edit.php2,097 ▼31.96 ▼0.0034.05 ▼3.0435.53 ▼0.69
Add New Post /wp-admin/post-new.php1,533 ▲723.20 ▼0.27682.48 ▼1.9060.08 ▲6.17
Media Library /wp-admin/upload.php1,400 ▼04.20 ▼0.0793.52 ▼3.8541.30 ▼2.46
LACRM /wp-admin/admin.php?page=wpcf7-lacrm-config280.420.084.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie tables were found after uninstall: 1 table
    • wp_lacrm_connector
  • The uninstall procedure has failed, leaving 9 options in the database
    • db_upgraded
    • can_compress_scripts
    • lacrm_api_token
    • lacrm_user_code
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • lacrm_verify_token
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Lacrm_Connector_Service' not found in wp-content/plugins/lacrm-connector-for-contact-form7/includes/pages/lacrm.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lacrm-connector-for-contact-form7/includes/pages/lacrm-config.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wpcf7-lacrm-config
    • > Network (severe)
    wp-admin/admin.php?page=wpcf7-lacrm-config - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% 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
9 plugin tags: contact forms, cf7, lessannoyingcrm, contact form 7 integrations, contact form 7...

lacrm-connector-for-contact-form7/lacrm-connector.php 85% from 13 tests

Analyzing the main PHP file in "CF7 LACRM Connector" version 1.2
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lacrm-connector-for-contact-form7.php" instead of "lacrm-connector.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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 plugin1,520 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5170217949
JavaScript261105283
CSS160185
PO File14258103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity25.50
▷ Minimum class complexity12.00
▷ Maximum class complexity46.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods12.56%
▷ Public methods3384.62%
▷ Protected methods00.00%
▷ Private methods615.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/trash.png0.35KB0.29KB▼ 17.65%
assets/img/remove.png0.50KB0.44KB▼ 11.91%
assets/img/help.png1.51KB1.35KB▼ 10.25%