67% advanced-cf7-db

Code Review | Advanced Contact form 7 DB

WordPress plugin Advanced Contact form 7 DB scored 67% from 54 tests.

About plugin

  • Plugin page: advanced-cf7-db
  • Plugin version: 2.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Jul 13, 2017
  • Latest release: Sep 20, 2023
  • Number of updates: 67
  • Update frequency: every 33.8 days
  • Top authors: vsourz1td (100%)

Code review

54 tests

User reviews

40 reviews

Install metrics

90,000+ active / 753,841 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.58MB] [CPU: ▲2.48ms] Passed 4 tests

Analyzing server-side resources used by Advanced Contact form 7 DB
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.09 ▲0.6339.26 ▼0.78
Dashboard /wp-admin3.94 ▲0.6451.39 ▲8.45
Posts /wp-admin/edit.php3.99 ▲0.6449.06 ▲3.25
Add New Post /wp-admin/post-new.php6.48 ▲0.5988.61 ▲0.91
Media Library /wp-admin/upload.php3.70 ▲0.4740.25 ▲6.52
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius4.0337.02

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 1,390 new files
Database: 2 new tables, 10 new options
New tables
wp_cf7_vdata
wp_cf7_vdata_entry
New WordPress options
fs_accounts
widget_recent-comments
can_compress_scripts
fs_debug_mode
fs_active_plugins
vsz_cf7_db_version
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Contact form 7 DB
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲2913.65 ▲0.341.83 ▲0.1328.89 ▼10.62
Dashboard /wp-admin2,221 ▲155.85 ▲0.9894.02 ▼3.7442.08 ▲6.23
Posts /wp-admin/edit.php2,110 ▲212.00 ▼0.0534.91 ▲1.6034.83 ▲0.22
Add New Post /wp-admin/post-new.php1,519 ▼1523.22 ▲0.04694.25 ▲32.8356.91 ▲0.73
Media Library /wp-admin/upload.php1,406 ▲184.25 ▲0.1296.47 ▼13.5846.06 ▼1.38
Freemius Debug [v.2.5.12] /wp-admin/admin.php?page=freemius1,0501.7026.6226.20

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_cf7_vdata
    • wp_cf7_vdata_entry
  • This plugin does not fully uninstall, leaving 10 options in the database
    • vsz_cf7_db_version
    • widget_recent-comments
    • fs_active_plugins
    • widget_recent-posts
    • can_compress_scripts
    • fs_debug_mode
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • fs_accounts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Please fix the following
  • 17× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/advanced-cf7-db/admin/partials/import_cf7_csv.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xlsx/PHP_XLSXWriter-master/examples/ex02-formats.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/markbaker/complex/examples/complexTest.php
    • > /wp-content/plugins/advanced-cf7-db/includes/vsz-cf7-db-function.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/markbaker/complex/examples/testFunctions.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xlsx/PHP_XLSXWriter-master/examples/ex06-strings-250k-rows.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xlsx/PHP_XLSXWriter-master/example.php
    • > /wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xlsx/PHP_XLSXWriter-master/examples/ex05-numbers-250k-rows.php
    • > /wp-content/plugins/advanced-cf7-db/admin/partials/advanced-cf7-db-admin-display.php
  • 423× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI.php:7
    • > PHP Notice
      Trying to access array offset on value of type int in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xlsx/PHP_XLSXWriter-master/xlsxwriter.class.php on line 811
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_DefinitionCache' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIScheme' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Calculation\\Engineering\\ConvertBase' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Engineering/ConvertBinary.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_Lexer_DOMLex' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Lexer/PH5P.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/advanced-cf7-db/admin/class/PHPExcel/CachedObjectStorage/MemoryGZip.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Writer\\BaseWriter' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/CSS/Ident.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_AttrDef' not found in wp-content/plugins/advanced-cf7-db/includes/libraries/excel/xls/vendor/ezyang/htmlpurifier/library/HTMLPurifier/AttrDef/URI/Email.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: Screenshot #6 (Developer Support) image not found
The official readme.txt is a good inspiration

advanced-cf7-db/advanced-cf7-db.php Passed 13 tests

The main file in "Advanced Contact form 7 DB" v. 2.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
135 characters long description:
Save all contact form 7 submitted data to the database, View, Export, ordering, Change field labels, Import data using CSV very easily.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected191,064 lines of code in 1,220 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,15439,223105,292182,002
CSS1958533,337
JavaScript72912172,346
Markdown1843401,295
JSON11101,252
SVG500659
YAML122096
Bourne Shell23143
XML27133
INI1111

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 3,088)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.10
▷ Minimum class complexity1.00
▷ Maximum class complexity3,088.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces76
Interfaces34
Traits0
Classes940
▷ Abstract classes525.53%
▷ Concrete classes88894.47%
▷ Final classes10.11%
Methods9,128
▷ Static methods2,32525.47%
▷ Public methods6,92475.85%
▷ Protected methods3403.72%
▷ Private methods1,86420.42%
Functions321
▷ Named functions28689.10%
▷ Anonymous functions3510.90%
Constants2,030
▷ Global constants24111.87%
▷ Class constants1,78988.13%
▷ Public constants1,73496.93%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/advanced-cf7-db.png9.16KB5.26KB▼ 42.58%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%