84% cf7-add-to-page

Code Review | Contact Form 7: Add to Page

WordPress plugin Contact Form 7: Add to Page scored84%from 54 tests.

About plugin

  • Plugin page: cf7-add-to-page
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8
  • WordPress version: 6.3.1
  • First release: Nov 18, 2017
  • Latest release: Nov 18, 2017
  • Number of updates: 3
  • Update frequency: every 1.7 days
  • Top authors: philiprabbett (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /957 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.62ms] Passed 4 tests

A check of server-side resources used by Contact Form 7: Add to Page
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0234.51 ▼2.78
Dashboard /wp-admin3.33 ▲0.0242.00 ▼7.00
Posts /wp-admin/edit.php3.38 ▲0.0247.25 ▲1.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0295.19 ▲1.00
Media Library /wp-admin/upload.php3.25 ▲0.0232.95 ▼1.70

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form 7: Add to Page
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.31 ▼0.811.54 ▼0.1536.09 ▼3.41
Dashboard /wp-admin2,206 ▲155.91 ▲1.04111.75 ▲8.9042.03 ▼2.16
Posts /wp-admin/edit.php2,089 ▲32.05 ▲0.0339.04 ▲2.9237.31 ▲3.51
Add New Post /wp-admin/post-new.php1,528 ▼1118.36 ▼4.56609.62 ▲44.5561.41 ▲10.78
Media Library /wp-admin/upload.php1,391 ▼04.22 ▲0.0595.22 ▼0.1040.10 ▼0.47

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/cf7-add-to-page/cf7-add-to-page.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention:
  • Requires php: Version format is invalid
The official readme.txt might help

cf7-add-to-page/cf7-add-to-page.php Passed 13 tests

The principal PHP file in "Contact Form 7: Add to Page" v. 1.0.1 is loaded by WordPress automatically on each request
83 characters long description:
A plugin that provides a dropdown of selectable forms for easy attachment to pages.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin120 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12469120

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected