83% cf7-hidden-widget

Code Review | Contact Form 7 - Hidden Widget

WordPress plugin Contact Form 7 - Hidden Widget scored83%from 54 tests.

About plugin

  • Plugin page: cf7-hidden-widget
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9.23-5.3.2
  • WordPress version: 6.3.1
  • First release: Jul 21, 2018
  • Latest release: Jan 6, 2020
  • Number of updates: 3
  • Update frequency: every 179.0 days
  • Top authors: iranalves85 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /558 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
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.14ms] Passed 4 tests

This is a short check of server-side resources used by Contact Form 7 - Hidden Widget
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0452.31 ▲9.36
Dashboard /wp-admin3.35 ▲0.0451.15 ▼1.71
Posts /wp-admin/edit.php3.40 ▲0.0454.55 ▲2.29
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.27 ▼20.98
Media Library /wp-admin/upload.php3.28 ▲0.0438.91 ▲3.86

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_cc7_hw
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7 - Hidden Widget
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.21 ▼0.211.68 ▼0.4242.81 ▼1.09
Dashboard /wp-admin2,198 ▲215.64 ▲0.0893.99 ▼0.4140.19 ▼5.49
Posts /wp-admin/edit.php2,103 ▲61.94 ▼0.0841.49 ▲3.0938.28 ▲1.17
Add New Post /wp-admin/post-new.php1,529 ▼922.92 ▼0.30667.28 ▼24.6056.32 ▼0.86
Media Library /wp-admin/upload.php1,400 ▼34.20 ▲0.09102.18 ▼6.5944.74 ▲1.15

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_cc7_hw
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

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)
Even though no errors were found, this is by no means an exhaustive test

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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/cf7-hidden-widget/contact-form-7-hidden-widget.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: No valid plugin tags found
  • Requires php: Invalid plugin version format
The official readme.txt might help

cf7-hidden-widget/contact-form-7-hidden-widget.php 92% from 13 tests

The principal PHP file in "Contact Form 7 - Hidden Widget" v. 0.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("cf7-hidden-widget.php" instead of "contact-form-7-hidden-widget.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
Everything looks great! No dangerous files found in this plugin246 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP14789112
PO File1202073
Markdown118037
JavaScript1131524

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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