84% contact-form-7-textarea-wordcount

Code Review | Contact Form 7 Textarea Wordcount

WordPress plugin Contact Form 7 Textarea Wordcount scored84%from 54 tests.

About plugin

  • Plugin page: contact-form-7-te...
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4
  • WordPress version: 6.3.1
  • First release: Jan 4, 2011
  • Latest release: Mar 17, 2016
  • Number of updates: 19
  • Update frequency: every 100.0 days
  • Top authors: chousmith (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /7,767 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.47ms] Passed 4 tests

A check of server-side resources used by Contact Form 7 Textarea Wordcount
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.49 ▼1.91
Dashboard /wp-admin3.31 ▲0.0150.08 ▼0.75
Posts /wp-admin/edit.php3.36 ▲0.0150.12 ▼7.78
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.75 ▼14.48
Media Library /wp-admin/upload.php3.23 ▲0.0139.00 ▼1.70

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Contact Form 7 Textarea Wordcount: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.47 ▲0.081.67 ▼0.3441.44 ▼6.29
Dashboard /wp-admin2,192 ▲125.58 ▼0.0783.02 ▼7.3139.14 ▼6.02
Posts /wp-admin/edit.php2,100 ▼02.05 ▲0.0739.34 ▲5.4934.21 ▼2.83
Add New Post /wp-admin/post-new.php1,526 ▼517.69 ▼5.49691.49 ▲38.0754.33 ▲1.32
Media Library /wp-admin/upload.php1,403 ▼04.17 ▼0.0697.42 ▼6.8246.25 ▼1.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× 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/contact-form-7-textarea-wordcount/cf7-textarea-wordcount.php:91

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === contact-form-7-textarea-wordcount === )
The official readme.txt might help

contact-form-7-textarea-wordcount/cf7-textarea-wordcount.php 92% from 13 tests

The principal PHP file in "Contact Form 7 Textarea Wordcount" v. 1.1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("contact-form-7-textarea-wordcount.php" instead of "cf7-textarea-wordcount.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected158 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14317129
JavaScript12129

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 compressed PNG files occupy 0.02MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png8.45KB8.12KB▼ 3.91%
screenshot-1.png8.36KB7.53KB▼ 9.99%