84% shortcode-anywhere-for-contact-form-7

Code Review | Shortcode Anywhere for Contact Form 7

WordPress plugin Shortcode Anywhere for Contact Form 7 scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-anywher...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Dec 12, 2016
  • Latest release: Dec 16, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: seregahere (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /884 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 gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼11.69ms] Passed 4 tests

A check of server-side resources used by Shortcode Anywhere for Contact Form 7
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.25 ▲4.03
Dashboard /wp-admin3.32 ▼0.0346.76 ▼20.71
Posts /wp-admin/edit.php3.37 ▲0.0152.38 ▼0.47
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.31 ▼23.19
Media Library /wp-admin/upload.php3.24 ▲0.0133.66 ▼2.38

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shortcode Anywhere for Contact Form 7
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.311.87 ▲0.1542.14 ▼0.79
Dashboard /wp-admin2,192 ▲155.55 ▼0.0686.54 ▼12.4439.66 ▼7.25
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0239.64 ▲3.7837.58 ▲1.12
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▲0.19638.50 ▼16.5856.66 ▼8.52
Media Library /wp-admin/upload.php1,400 ▼34.18 ▼0.0597.94 ▼0.5142.51 ▼0.48

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/shortcode-anywhere-for-contact-form-7/wpcf7-shortcode-anywhere.php

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: feedback, email, shortcode, contact form, form...

shortcode-anywhere-for-contact-form-7/wpcf7-shortcode-anywhere.php 92% from 13 tests

"Shortcode Anywhere for Contact Form 7" version 0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shortcode-anywhere-for-contact-form-7.php" instead of "wpcf7-shortcode-anywhere.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected40 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP116840

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods120.00%
▷ Public methods480.00%
▷ Protected methods120.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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