68% cf7-database

Code Review | Database for Contact Form 7

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

About plugin

  • Plugin page: cf7-database
  • Plugin version: 3.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2017
  • Latest release: Sep 8, 2023
  • Number of updates: 28
  • Update frequency: every 84.6 days
  • Top authors: ninjateam (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

7,000+ active /93,182 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼4.90ms] Passed 4 tests

Server-side resources used by Database for Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1636.93 ▼2.47
Dashboard /wp-admin3.46 ▲0.1647.58 ▼4.93
Posts /wp-admin/edit.php3.57 ▲0.2247.56 ▼0.83
Add New Post /wp-admin/post-new.php6.04 ▲0.1684.18 ▼10.28
Media Library /wp-admin/upload.php3.38 ▲0.1634.98 ▼1.91
Database /wp-admin/admin.php?page=cf7-data3.2828.80

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 21 new files
Database: 2 new tables, 6 new options
New tables
wp_cf7_data_entry
wp_cf7_data
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Database for Contact Form 7: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.011.60 ▼0.0736.54 ▼1.88
Dashboard /wp-admin2,198 ▲205.64 ▲0.0081.42 ▼23.4539.21 ▼4.57
Posts /wp-admin/edit.php2,100 ▼01.96 ▼0.1834.43 ▼2.0831.25 ▼3.45
Add New Post /wp-admin/post-new.php1,526 ▼023.10 ▼0.09677.24 ▼22.5853.28 ▼28.80
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0293.33 ▼5.1641.07 ▼3.16
Database /wp-admin/admin.php?page=cf7-data1,1348.58190.5745.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_cf7_data_entry
    • wp_cf7_data
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=cf7-data
    • > Notice in wp-content/plugins/cf7-database/admin/init.php+125
    Undefined offset: 0
    • > GET request to /wp-admin/admin.php?page=cf7-data
    • > Notice in wp-content/plugins/cf7-database/admin/init.php+125
    Trying to access array offset on value of type null

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
The following issues need your attention
  • 9× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/cf7-database/admin/unique-id.php
    • > /wp-content/plugins/cf7-database/frontend/init.php
    • > /wp-content/plugins/cf7-database/admin/Helper.php
    • > /wp-content/plugins/cf7-database/cf7-database.php
    • > /wp-content/plugins/cf7-database/functions.php
    • > /wp-content/plugins/cf7-database/admin/I18n.php
    • > /wp-content/plugins/cf7-database/frontend/save-files.php
    • > /wp-content/plugins/cf7-database/admin/init.php
    • > /wp-content/plugins/cf7-database/admin/Ajax.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% 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, contact form, save data, save form, form...

cf7-database/cf7-database.php 92% from 13 tests

The main PHP script in "Database for Contact Form 7" version 3.0.6 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,482 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP108460984
PO File3192201461
CSS24027
JavaScript103710

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions3193.94%
▷ Anonymous functions26.06%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin