82% cf7-text-field-size-addon

Code Review | CF7 text field size Addon

WordPress plugin CF7 text field size Addon scored82%from 54 tests.

About plugin

  • Plugin page: cf7-text-field-si...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.2.1
  • WordPress version: 6.3.1
  • First release: Jun 28, 2023
  • Latest release: Jun 28, 2023
  • Number of updates: 2
  • Update frequency: every 4.5 days
  • Top authors: wpteamindianic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /253 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by CF7 text field size Addon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.90 ▼8.09
Dashboard /wp-admin3.31 ▲0.0145.97 ▼4.92
Posts /wp-admin/edit.php3.36 ▲0.0148.93 ▲2.60
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.64 ▼1.64
Media Library /wp-admin/upload.php3.24 ▲0.0136.29 ▲3.90

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for CF7 text field size Addon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼1.134.42 ▲2.2843.70 ▼4.17
Dashboard /wp-admin2,203 ▲154.87 ▼1.1895.42 ▼10.2738.77 ▼0.92
Posts /wp-admin/edit.php2,092 ▲32.04 ▼0.0138.03 ▲2.9833.93 ▼3.14
Add New Post /wp-admin/post-new.php1,542 ▲918.39 ▼4.75595.25 ▼57.7360.12 ▼3.54
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.1194.09 ▼6.2641.35 ▼9.85

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-text-field-size-addon/admin/admin-init.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-text-field-size-addon/public/cf7-ts-form-tag.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 73% 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
Please fix the following attributes:
  • Screenshots: Screenshot #1 (Screenshots 1) image missing
  • Requires at least: The plugin version is formatted incorrectly
The official readme.txt might help

cf7-text-field-size-addon/cf7-text-field-size.php 54% from 13 tests

This is the main PHP file of "CF7 text field size Addon" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 485 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: Please prefix the domain path with a forward slash character ("/languages/")
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-text-field-size-addon.php" instead of "cf7-text-field-size.php")
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "7.2")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages/")

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
Success! There were no dangerous files found in this plugin217 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP55165183
Markdown113034

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin