83% wp-contact-form-7-db-handler

Code Review | WP Contact Form 7 DB Handler

WordPress plugin WP Contact Form 7 DB Handler scored83%from 54 tests.

About plugin

  • Plugin page: wp-contact-form-7...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Aug 4, 2020
  • Latest release: Apr 10, 2023
  • Number of updates: 17
  • Update frequency: every 57.8 days
  • Top authors: yudiz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /864 total downloads

Benchmarks

Plugin footprint 83% 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 gracefully, with no errors

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.51ms] Passed 4 tests

A check of server-side resources used by WP Contact Form 7 DB Handler
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.52 ▲0.66
Dashboard /wp-admin3.39 ▲0.0950.34 ▲0.18
Posts /wp-admin/edit.php3.44 ▲0.0951.20 ▼6.95
Add New Post /wp-admin/post-new.php5.97 ▲0.0999.59 ▼3.94
Media Library /wp-admin/upload.php3.31 ▲0.0936.71 ▲1.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Contact Form 7 DB Handler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.22 ▼0.774.82 ▲2.9841.25 ▼3.86
Dashboard /wp-admin2,215 ▲274.86 ▼0.96102.00 ▼5.7038.16 ▼6.53
Posts /wp-admin/edit.php2,104 ▲121.98 ▼0.0240.26 ▼2.5036.74 ▲0.27
Add New Post /wp-admin/post-new.php1,547 ▲1423.08 ▼0.05644.66 ▼17.9455.89 ▼13.97
Media Library /wp-admin/upload.php1,400 ▲94.31 ▲0.1597.32 ▼7.3742.57 ▼4.62

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-contact-form-7-db-handler/include/form-inner-page-class.php on line 129
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/wp-contact-form-7-db-handler/include/show-form-count-page-class.php:4
    • > 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/wp-contact-form-7-db-handler/include/form-inner-page-class.php on line 129
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-contact-form-7-db-handler/wp-contact-form-7-db-handler.php:13
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-contact-form-7-db-handler/include/form-inner-page-class.php on line 129

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 issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #2, #3, #4, #5, #6 in wp-contact-form-7-db-handler/assets to your readme.txt
  • Stable tag: Empty value
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

wp-contact-form-7-db-handler/wp-contact-form-7-db-handler.php Passed 13 tests

"WP Contact Form 7 DB Handler" version 1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
This plugin is created to display Contact Form 7 submitted data from database.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,436 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5182871,195
JavaScript1104134
CSS25696
SVG10011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity44.20
▷ Minimum class complexity8.00
▷ Maximum class complexity137.00
Average method complexity6.48
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2482.76%
▷ Protected methods26.90%
▷ Private methods310.34%
Functions12
▷ Named functions650.00%
▷ Anonymous functions650.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin