57% advanced-cf7-database

Code Review | Contact Form 7 Database - CFDB7

WordPress plugin Contact Form 7 Database - CFDB7 scored57%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: 6.3.1
  • 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

600+ active /4,851 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
Install script ran successfully

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

This is a short check of server-side resources used by Contact Form 7 Database - CFDB7
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1743.80 ▲6.34
Dashboard /wp-admin3.48 ▲0.1347.18 ▼17.09
Posts /wp-admin/edit.php3.59 ▲0.2350.12 ▲3.20
Add New Post /wp-admin/post-new.php6.06 ▲0.1792.02 ▼7.71
Media Library /wp-admin/upload.php3.40 ▲0.1741.06 ▲3.59
Contact Forms /wp-admin/admin.php?page=advanced-cf7-listing3.3833.50
Premium /wp-admin/admin.php?page=acf7_extensions3.3735.43

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 144 new files
Database: 1 new table, 7 new options
New tables
wp_advanced_cf7_data
New WordPress options
plugin_db_version
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Contact Form 7 Database - CFDB7
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲5613.63 ▼0.534.86 ▲2.9143.17 ▲1.49
Dashboard /wp-admin2,230 ▲425.84 ▲0.94102.76 ▼13.0739.33 ▼6.82
Posts /wp-admin/edit.php2,116 ▲272.00 ▼0.0539.09 ▼2.0133.90 ▼6.32
Add New Post /wp-admin/post-new.php1,536 ▲317.41 ▼5.83600.70 ▼85.9658.48 ▼2.20
Media Library /wp-admin/upload.php1,415 ▲274.24 ▲0.10100.43 ▼3.3945.12 ▼1.31
Contact Forms /wp-admin/admin.php?page=advanced-cf7-listing8882.0624.7123.29
Premium /wp-admin/admin.php?page=acf7_extensions8222.1823.2323.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_advanced_cf7_data
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • plugin_db_version
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/fonts/utils/makefont.php
  • 15× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > 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
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/tcpdf.php on line 19670
    • > 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 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-subpages.php on line 31
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/fonts/utils/makefont.php on line 595
    • > 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 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 Notice
      Undefined index: argv in wp-content/plugins/advanced-cf7-database/inc/pdfgenerate/tcpdf/fonts/utils/makefont.php on line 594
    • > 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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7 in advanced-cf7-database/assets to your readme.txt
  • Contributors: Contributors not specified
The official readme.txt might help

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

The main PHP file in "Contact Form 7 Database - CFDB7" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main 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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with 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

Analyzing cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 4,763)
  • Cyclomatic complexity of methods should 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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_cell.png37.51KB36.62KB▼ 2.39%
inc/pdfgenerate/tcpdf/images/tcpdf_signature.png66.34KB25.47KB▼ 61.61%
inc/pdfgenerate/tcpdf/images/_blank.png0.13KB0.09KB▼ 30.66%