79% cf7-views

Code Review | Contact Form 7 Views

WordPress plugin Contact Form 7 Views scored79%from 54 tests.

About plugin

  • Plugin page: cf7-views
  • Plugin version: 2.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 21, 2018
  • Latest release: Oct 24, 2023
  • Number of updates: 124
  • Update frequency: every 14.3 days
  • Top authors: aman086 (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /18,546 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.22MB] [CPU: ▼4.31ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 Views
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2237.26 ▼0.26
Dashboard /wp-admin3.52 ▲0.2246.21 ▲0.15
Posts /wp-admin/edit.php3.64 ▲0.2846.49 ▼0.93
Add New Post /wp-admin/post-new.php6.11 ▲0.2281.81 ▼15.42
Media Library /wp-admin/upload.php3.45 ▲0.2234.91 ▼0.61
Add View /wp-admin/post-new.php?post_type=cf7-views3.4939.98
All CF7 Views /wp-admin/edit.php?post_type=cf7-views3.4936.07
Get Pro /wp-admin/edit.php?post_type=cf7-views&page=cf7-views-get-pro3.4230.93
Help /wp-admin/edit.php?post_type=cf7-views&page=cf7-views-help3.4231.97

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
cf7_views_reviews_installed_on
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Contact Form 7 Views: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲4814.35 ▼0.291.73 ▼0.1442.19 ▲3.59
Dashboard /wp-admin2,231 ▲515.66 ▼0.0085.85 ▼1.0638.62 ▼6.75
Posts /wp-admin/edit.php2,133 ▲361.98 ▼0.0534.40 ▼3.5233.78 ▼0.94
Add New Post /wp-admin/post-new.php1,556 ▲2922.88 ▼0.28660.75 ▼6.2455.09 ▼6.62
Media Library /wp-admin/upload.php1,433 ▲394.15 ▼0.0497.27 ▼9.1741.68 ▼6.84
Add View /wp-admin/post-new.php?post_type=cf7-views1,5284.2766.6559.36
All CF7 Views /wp-admin/edit.php?post_type=cf7-views1,1241.9729.2729.71
Get Pro /wp-admin/edit.php?post_type=cf7-views&page=cf7-views-get-pro8902.0223.5644.17
Help /wp-admin/edit.php?post_type=cf7-views&page=cf7-views-help8192.0322.5624.01

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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • cf7_views_reviews_installed_on
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

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 50% 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
The following issues need your attention
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-views/inc/admin/class-cf7-views-ajax.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-views/inc/admin/class-cf7-views-posttype.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-views/inc/admin/class-cf7-views-upgrade-to-pro-page.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cf7-views/inc/class-cf7-views-shortcode.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-views/inc/admin/class-cf7-views-metabox.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-views/inc/admin/class-cf7-views-support.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=cf7-views
    • > Javascript (severe) in unknown
    /wp-content/plugins/cf7-views/build/static/js/1.e3367321.chunk.js?ver=6.3.1 0:307749 Uncaught Error: Minified React error #200; visit https://reactjs.o… for full errors and additional helpful warnings.

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: cf7, contact form 7, display submissions

cf7-views/cf7-views.php Passed 13 tests

The primary PHP file in "Contact Form 7 Views" version 2.3.1 is used by WordPress to initiate all plugin functionality
47 characters long description:
Display Contact Form 7 Submissions in frontend.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin5,734 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
SVG30124,479
PHP122603271,178
CSS743774
JavaScript3033

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity3.06
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods63
▷ Static methods1523.81%
▷ Public methods5993.65%
▷ Protected methods34.76%
▷ Private methods11.59%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants233.33%
▷ Class constants466.67%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected