10% cf7-lead-manager

Code Review | WP contact form 7 db & Lead Manager plugin

WordPress plugin WP contact form 7 db & Lead Manager plugin scored 10% from 54 tests.

About plugin

  • Plugin page: cf7-lead-manager
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Dec 21, 2017
  • Latest release: May 20, 2018
  • Number of updates: 6
  • Update frequency: every 25.0 days
  • Top authors: shahzad11 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active / 1,229 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/cf7-lead-manager/index.php+17
    Use of undefined constant CF7LM_PLUGIN_SHORT_NAME - assumed 'CF7LM_PLUGIN_SHORT_NAME' (this will throw an Error in a future version of PHP)

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

A check of server-side resources used by WP contact form 7 db & Lead Manager plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.09 ▲0.43
Dashboard /wp-admin3.31 ▲0.0044.57 ▼2.20
Posts /wp-admin/edit.php3.36 ▲0.0049.80 ▲0.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0084.37 ▼12.71
Media Library /wp-admin/upload.php3.23 ▲0.0034.97 ▼1.00

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

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

Browser metrics Passed 4 tests

WP contact form 7 db & Lead Manager plugin: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.381.72 ▼0.0744.08 ▼0.55
Dashboard /wp-admin2,209 ▲214.85 ▼0.05106.66 ▲5.1037.98 ▼3.13
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0136.43 ▼5.3533.40 ▼2.36
Add New Post /wp-admin/post-new.php1,533 ▲1323.23 ▲0.03640.08 ▲24.6563.14 ▲7.00
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0191.43 ▼6.6840.98 ▼1.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cf7-lead-manager/admin/index.php
    • > /wp-content/plugins/cf7-lead-manager/includes/plugin_install.php
    • > /wp-content/plugins/cf7-lead-manager/admin/tabs.php
    • > /wp-content/plugins/cf7-lead-manager/index.php
    • > /wp-content/plugins/cf7-lead-manager/includes/CF7LM.class.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: Add images for these screenshots: #1 (CF7LM settings page), #2 (Leads view), #3 (Reports View)
The official readme.txt might help

cf7-lead-manager/index.php 92% from 13 tests

The main PHP file in "WP contact form 7 db & Lead Manager plugin" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-lead-manager.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin474 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP515260474

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity30.00
▷ Minimum class complexity30.00
▷ Maximum class complexity30.00
Average method complexity4.22
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
6 PNG files occupy 0.87MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/csv-export.png5.05KB2.07KB▼ 58.99%
admin/settings.png1.40KB1.33KB▼ 4.68%
screenshot-1.png271.75KB66.69KB▼ 75.46%
screenshot-3.png273.66KB67.07KB▼ 75.49%
screenshot-2.png340.01KB89.69KB▼ 73.62%