74% cf7-save-to-database

Code Review | Contact Form 7 Save to Database (Add-on for CF7)

WordPress plugin Contact Form 7 Save to Database (Add-on for CF7) scored74%from 54 tests.

About plugin

  • Plugin page: cf7-save-to-database
  • Plugin version: 1.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 20, 2018
  • Latest release: Mar 24, 2019
  • Number of updates: 6
  • Update frequency: every 56.2 days
  • Top authors: azmarket (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /738 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Contact Form 7 Save to Database (Add-on for CF7)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.63 ▲4.22
Dashboard /wp-admin3.31 ▲0.0151.14 ▲1.18
Posts /wp-admin/edit.php3.36 ▲0.0046.88 ▼3.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.82 ▼18.24
Media Library /wp-admin/upload.php3.23 ▲0.0037.50 ▲1.01

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 19 new files
Database: 1 new table, 6 new options
New tables
wp_cf7_bhdb
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Save to Database (Add-on for CF7)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.80 ▲0.151.79 ▲0.1043.44 ▲4.05
Dashboard /wp-admin2,230 ▲305.01 ▼0.83111.48 ▲6.2743.52 ▲0.24
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0035.37 ▼4.8738.60 ▲4.96
Add New Post /wp-admin/post-new.php1,554 ▼023.15 ▲4.80659.40 ▲6.0152.08 ▲0.62
Media Library /wp-admin/upload.php1,406 ▲94.31 ▲0.0995.72 ▼7.5144.36 ▼2.45

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
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_cf7_bhdb
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: fid in wp-content/plugins/cf7-save-to-database/tpl/ad-table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cf7-save-to-database/cf7-save-to-database.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/cf7-save-to-database/tpl/ad-table.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-to-database/inc/frontend.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-save-to-database/inc/admin.php:6

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: cf 7 dataabse, contact form 7, database, cf7, contact form 7 database...

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

"Contact Form 7 Save to Database (Add-on for CF7)" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,760 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP7182115812
JavaScript4158169555
CSS35119386
SVG1017

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity12.80
▷ Minimum class complexity8.00
▷ Maximum class complexity16.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods23
▷ Static methods939.13%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin