84% cf7-telegram

Code Review | Contact Form 7 + Telegram

WordPress plugin Contact Form 7 + Telegram scored84%from 54 tests.

About plugin

  • Plugin page: cf7-telegram
  • Plugin version: 0.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Aug 1, 2018
  • Latest release: Sep 22, 2020
  • Number of updates: 55
  • Update frequency: every 14.2 days
  • Top authors: hokku (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

8,000+ active /24,817 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Contact Form 7 + Telegram
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0240.61 ▲2.66
Dashboard /wp-admin3.33 ▼0.0245.55 ▼13.45
Posts /wp-admin/edit.php3.38 ▲0.0250.48 ▲9.12
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.87 ▼18.62
Media Library /wp-admin/upload.php3.25 ▲0.0234.22 ▲0.41

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Contact Form 7 + Telegram: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.23 ▼0.121.51 ▼0.1339.63 ▼5.46
Dashboard /wp-admin2,195 ▲185.54 ▲0.0094.13 ▲9.4436.45 ▲0.05
Posts /wp-admin/edit.php2,103 ▲61.98 ▼0.0439.39 ▲0.1835.31 ▼6.59
Add New Post /wp-admin/post-new.php1,526 ▼923.54 ▲5.39665.93 ▲58.7758.40 ▼14.06
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0395.84 ▼3.6640.47 ▲0.32

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

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

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)
Everything seems fine, however 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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/cf7-telegram/cf7-telegram.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cf7-telegram/inc/wp5_functions/wp5_functions.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
3 plugin tags: contact form telegram, telegram, contact form 7

cf7-telegram/cf7-telegram.php Passed 13 tests

The primary PHP file in "Contact Form 7 + Telegram" version 0.8 is used by WordPress to initiate all plugin functionality
31 characters long description:
Sends messages to Telegram-chat

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
Good job! No executable or dangerous file extensions detected670 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP711369572
CSS19071
JavaScript14027

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity74.00
▷ Minimum class complexity74.00
▷ Maximum class complexity74.00
Average method complexity2.74
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods42
▷ Static methods12.38%
▷ Public methods2354.76%
▷ Protected methods00.00%
▷ Private methods1945.24%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin