57% advanced-cf7-database

Code Review | Contact Form 7 Database - CFDB7

WordPress plugin Contact Form 7 Database - CFDB7 scored 57% from 54 tests.

About plugin

  • Plugin page: advanced-cf7-data...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.4
  • WordPress version: 5.9.2
  • First release: May 13, 2018
  • Latest release: May 14, 2018
  • Number of updates: 19
  • Update frequency: every 0.1 days
  • Top authors: penguinarts (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active / 4,024 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼307.84ms] Passed 4 tests

Server-side resources used by Contact Form 7 Database - CFDB7
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2358.30 ▲8.89
Dashboard /wp-admin3.58 ▲0.1836.09 ▲3.56
Posts /wp-admin/edit.php3.81 ▲0.1742.15 ▲6.50
Add New Post /wp-admin/post-new.php7.05 ▲0.0895.92 ▼1,244.94
Media Library /wp-admin/upload.php3.46 ▲0.1726.80 ▲3.54
Contact Forms /wp-admin/admin.php?page=advanced-cf7-listing3.4427.04
Premium /wp-admin/admin.php?page=acf7_extensions3.4324.13

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 144 new files
Database: 1 new table, 1 new option
New tables
wp_advanced_cf7_data
New WordPress options
plugin_db_version

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Database - CFDB7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,829 ▲8715.79 ▼0.347.68 ▲1.702.54 ▲0.37
Dashboard /wp-admin2,926 ▲686.15 ▲0.08115.30 ▼17.50154.82 ▼3.90
Posts /wp-admin/edit.php2,725 ▲313.25 ▲0.0263.84 ▲1.11144.58 ▲4.69
Add New Post /wp-admin/post-new.php1,782 ▲12122.72 ▲6.61409.23 ▲10.31163.68 ▲13.47
Media Library /wp-admin/upload.php1,735 ▲375.51 ▼0.01141.30 ▼0.33192.19 ▲3.45
Contact Forms /wp-admin/admin.php?page=advanced-cf7-listing1,1692.3754.6098.87
Premium /wp-admin/admin.php?page=acf7_extensions1,0962.4153.99115.46

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
  • Zombie tables detected upon uninstall: 1 table
    • wp_advanced_cf7_data
  • This plugin does not fully uninstall, leaving 1 option in the database
    • plugin_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/fonts/utils/makefont.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require_once(../config/lang/eng.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/example_055.php on line 30
    • > PHP Notice
      Undefined index: argv in wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/fonts/utils/makefont.php on line 594
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/advanced-cf7-database/class-advanced-cf7-database.php on line 41
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_cf7_database' not found in wp-content/plugins/advanced-cf7-database/inc/class-advanced-cf7-main-pages.php:3
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-cf7-database/inc/class-advanced-cf7-main-pages.php on line 107
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/advanced-cf7-database/inc/class-advanced-cf7-main-pages.php on line 107
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_cf7_database' not found in wp-content/plugins/advanced-cf7-database/inc/class-plugin-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Advanced_cf7_database' not found in wp-content/plugins/advanced-cf7-database/inc/class-contact-form-details.php:3
    • > PHP Fatal error
      require_once(): Failed opening required '../config/lang/eng.php' (include_path='.:/usr/share/php') in wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/example_055.php on line 30
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/advanced-cf7-database/inc/class-advanced-cf7-subpages.php on line 31

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4, #5, #6, #7 in advanced-cf7-database/assets to your readme.txt
  • Contributors: Contributors not specified
You can look at the official readme.txt

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

The entry point to "Contact Form 7 Database - CFDB7" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("advanced-cf7-database.php" instead of "class-advanced-cf7-database.php")

Code Analysis 0% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .exe - Executable in Windows
      • wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/fonts/utils/ttf2ufm.exe
133,808 lines of code in 91 files:
LanguageFilesBlank linesComment linesLines of code
PHP881,71811,521131,984
SVG2111,813
HTML10011

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Please fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 4,763)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 446)
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity342.31
▷ Minimum class complexity1.00
▷ Maximum class complexity4,763.00
Average method complexity9.71
▷ Minimum method complexity1.00
▷ Maximum method complexity446.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods627
▷ Static methods10.16%
▷ Public methods33553.43%
▷ Protected methods28745.77%
▷ Private methods50.80%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants103
▷ Global constants10299.03%
▷ Class constants10.97%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.13MB with 0.05MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/pdfgenerate/badge-header-logo.png27.87KB6.66KB▼ 76.11%
inc/pdfgenerate/tcpdf/images/tcpdf_signature.png66.34KB25.47KB▼ 61.61%
inc/pdfgenerate/tcpdf/images/_blank.png0.13KB0.09KB▼ 30.66%
inc/pdfgenerate/tcpdf/images/tcpdf_cell.png37.51KB36.62KB▼ 2.39%