84% form-data-manager

Code Review | Contact Form 7 Database Manager Addon – CF7DBM

WordPress plugin Contact Form 7 Database Manager Addon – CF7DBM scored84%from 54 tests.

About plugin

  • Plugin page: form-data-manager
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 2, 2019
  • Latest release: Sep 13, 2023
  • Number of updates: 33
  • Update frequency: every 46.6 days
  • Top authors: mohammed.nasri (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /1,683 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.94ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 Database Manager Addon – CF7DBM
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.10 ▼8.10
Dashboard /wp-admin3.32 ▲0.0148.26 ▲1.33
Posts /wp-admin/edit.php3.43 ▲0.0747.47 ▼5.55
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.17 ▼11.44
Media Library /wp-admin/upload.php3.24 ▲0.0136.26 ▲1.99

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 63 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Contact Form 7 Database Manager Addon – CF7DBM
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6314.81 ▲0.581.71 ▼0.1643.84 ▼0.68
Dashboard /wp-admin2,230 ▲304.85 ▼1.03104.80 ▼0.7140.53 ▼2.91
Posts /wp-admin/edit.php2,110 ▲101.99 ▼0.0738.46 ▲1.8036.48 ▲2.10
Add New Post /wp-admin/post-new.php1,432 ▼11317.72 ▼5.61575.50 ▼43.8643.89 ▼12.06
Media Library /wp-admin/upload.php1,409 ▲124.23 ▲0.01100.13 ▼2.0341.25 ▼2.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/form-data-manager/inc/class-wpfdm-contacts-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/form-data-manager/form-data-manager.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/form-data-manager/inc/class-wpfdm-data-import.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/form-data-manager/inc/class-wpfdm-forms-list.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/form-data-manager/inc/class-wpfdm-data-export.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
9 plugin tags: contact form 7 export, contact form db, contact form seven, contact form 7 db, contact form 7...

form-data-manager/form-data-manager.php 92% from 13 tests

The entry point to "Contact Form 7 Database Manager Addon – CF7DBM" version 1.1.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 174 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin23,412 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,5055913,248
JavaScript122,0921,7798,112
PHP107669531,921
PO File15868131

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity18.10
▷ Minimum class complexity4.00
▷ Maximum class complexity66.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods97
▷ Static methods1010.31%
▷ Public methods8991.75%
▷ Protected methods00.00%
▷ Private methods88.25%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
19 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/theme_2_blue.png1.13KB0.20KB▼ 81.90%
admin/images/side-bg-notif-error.png0.19KB0.08KB▼ 58.29%
admin/images/side-bg-notif.png0.91KB0.08KB▼ 91.12%
admin/images/loupe-icon.png1.49KB0.80KB▼ 46.45%
admin/images/theme_1_gray.png1.15KB0.25KB▼ 78.18%