78% smaily-for-contact-form-7

Code Review | Smaily for Contact Form 7

WordPress plugin Smaily for Contact Form 7 scored78%from 54 tests.

About plugin

  • Plugin page: smaily-for-contac...
  • Plugin version: 1.0.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: May 27, 2020
  • Latest release: Mar 24, 2023
  • Number of updates: 11
  • Update frequency: every 96.9 days
  • Top authors: sendsmaily (54.55%)marispulk (36.36%)tomabel (27.27%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,632 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
This plugin's installer ran successfully

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

A check of server-side resources used by Smaily for Contact Form 7
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0058.67 ▲20.87
Dashboard /wp-admin3.31 ▲0.0044.86 ▼7.47
Posts /wp-admin/edit.php3.36 ▲0.0047.88 ▼2.45
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.31 ▼19.49
Media Library /wp-admin/upload.php3.23 ▲0.0033.55 ▼2.26

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Smaily for Contact Form 7: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.40 ▲0.041.81 ▲0.1637.43 ▼4.15
Dashboard /wp-admin2,195 ▲185.54 ▼0.1182.20 ▼5.1439.36 ▼0.66
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0636.35 ▼4.0332.02 ▼7.84
Add New Post /wp-admin/post-new.php1,526 ▼723.10 ▼0.01682.84 ▲9.2652.78 ▼1.78
Media Library /wp-admin/upload.php1,400 ▼04.16 ▼0.0596.70 ▼9.3240.22 ▼4.05

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/smaily-for-contact-form-7/smaily-for-contact-form-7.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/smaily-for-contact-form-7/admin/partials/smaily-for-cf7-admin-display.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: contact form 7, email, newsletter, smaily

smaily-for-contact-form-7/smaily-for-contact-form-7.php 85% from 13 tests

This is the main PHP file of "Smaily for Contact Form 7" version 1.0.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,408 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP182429191,170
PO File26078175
JavaScript13758
JSON1005

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity21.44
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.46
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods77
▷ Static methods1924.68%
▷ Public methods6179.22%
▷ Protected methods00.00%
▷ Private methods1620.78%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants1
▷ Global constants1100.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 files were detected