90% cf7-additional-types

Code Review | CF7 Additional Types

WordPress plugin CF7 Additional Types scored90%from 54 tests.

About plugin

  • Plugin page: cf7-additional-types
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.1
  • WordPress version: 6.3.1
  • First release: Jul 5, 2016
  • Latest release: Apr 12, 2019
  • Number of updates: 7
  • Update frequency: every 145.3 days
  • Top authors: janisf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,628 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.35ms] Passed 4 tests

Analyzing server-side resources used by CF7 Additional Types
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1034.94 ▼6.29
Dashboard /wp-admin3.41 ▲0.1044.86 ▼0.73
Posts /wp-admin/edit.php3.52 ▲0.1645.44 ▼5.24
Add New Post /wp-admin/post-new.php6.01 ▲0.1288.69 ▼9.14
Media Library /wp-admin/upload.php3.33 ▲0.1034.15 ▲2.00

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by CF7 Additional Types
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.40 ▼0.981.69 ▼0.0937.33 ▼6.79
Dashboard /wp-admin2,212 ▲244.88 ▼0.04112.11 ▲7.1542.28 ▲0.08
Posts /wp-admin/edit.php2,094 ▲22.02 ▼0.0239.40 ▲0.1535.91 ▲2.54
Add New Post /wp-admin/post-new.php1,543 ▲2418.22 ▼4.83607.70 ▼1.3563.13 ▲5.29
Media Library /wp-admin/upload.php1,397 ▲94.23 ▼0.0299.52 ▲5.5142.67 ▲2.43

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 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 everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (12 tag instead of maximum 10)
You can take inspiration from this readme.txt

cf7-additional-types/cf7-additional-types.php Passed 13 tests

"CF7 Additional Types" version 2.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
48 characters long description:
Additional input field types for Contact Form 7.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,453 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript717329556
PHP310647455
CSS24324358
PO File2121484

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity18.33
▷ Minimum class complexity10.00
▷ Maximum class complexity23.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes3100.00%
Methods23
▷ Static methods28.70%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants125.00%
▷ Class constants375.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin