84% naas-contact-form-7-redirect

Code Review | NAAS Contact Form 7 Redirect

WordPress plugin NAAS Contact Form 7 Redirect scored84%from 54 tests.

About plugin

  • Plugin page: naas-contact-form...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.7
  • WordPress version: 6.3.1
  • First release: Apr 6, 2021
  • Latest release: Apr 6, 2021
  • Number of updates: 6
  • Update frequency: every 0.2 days
  • Top authors: naasdigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /355 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by NAAS Contact Form 7 Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.63 ▼0.97
Dashboard /wp-admin3.32 ▲0.0156.94 ▼1.03
Posts /wp-admin/edit.php3.37 ▲0.0146.66 ▼4.58
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.49 ▼26.50
Media Library /wp-admin/upload.php3.24 ▲0.0141.30 ▲5.26

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

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

Browser metrics Passed 4 tests

NAAS Contact Form 7 Redirect: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.10 ▼0.531.59 ▼0.1243.56 ▼2.82
Dashboard /wp-admin2,208 ▲315.66 ▲0.0386.20 ▼6.0944.07 ▼0.60
Posts /wp-admin/edit.php2,110 ▲72.03 ▼0.0035.46 ▼1.6635.27 ▲3.28
Add New Post /wp-admin/post-new.php1,536 ▲123.01 ▲4.87697.14 ▲85.4552.39 ▼13.57
Media Library /wp-admin/upload.php1,410 ▲104.17 ▲0.02113.82 ▲1.5749.13 ▲4.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/naas-contact-form-7-redirect/index.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: contact form thank you, contact form 7 extension, thank you page redirection, contact form 7

naas-contact-form-7-redirect/naas-contact-form-7-redirect.php Passed 13 tests

The main file in "NAAS Contact Form 7 Redirect" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
128 characters long description:
A plugin for redirection after contact form 7 submission. it will be very usefull if we want add thank you page after submission

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
No dangerous file extensions were detected197 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP711234193
JavaScript3003
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions12
▷ Named functions12100.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
No PNG images were found in this plugin