62% cf7-editor-button

Code Review | Contact Form 7 Editor Button

WordPress plugin Contact Form 7 Editor Button scored62%from 54 tests.

About plugin

  • Plugin page: cf7-editor-button
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.0
  • WordPress version: 6.3.1
  • First release: Apr 27, 2017
  • Latest release: Apr 1, 2023
  • Number of updates: 14
  • Update frequency: every 154.6 days
  • Top authors: arisoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /3,433 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.86MB] [CPU: ▼29.77ms] Passed 4 tests

Analyzing server-side resources used by Contact Form 7 Editor Button
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1043.80 ▲5.43
Dashboard /wp-admin3.09 ▼0.2224.99 ▼21.63
Posts /wp-admin/edit.php3.09 ▼0.2727.79 ▼22.60
Add New Post /wp-admin/post-new.php3.09 ▼2.8025.17 ▼62.87
Media Library /wp-admin/upload.php3.09 ▼0.1423.92 ▼11.97
Btn /wp-admin/admin.php?page=contact-form-7-editor-button3.0926.15

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

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

Browser metrics Passed 4 tests

Contact Form 7 Editor Button: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.69 ▼0.961.79 ▲0.0242.01 ▼4.31
Dashboard /wp-admin2,209 ▲214.83 ▼0.05111.12 ▼1.7241.27 ▲2.43
Posts /wp-admin/edit.php2,086 ▼32.00 ▼0.0539.38 ▼0.9635.71 ▲0.36
Add New Post /wp-admin/post-new.php1,516 ▼1523.44 ▲5.03605.22 ▲1.4653.62 ▲2.19
Media Library /wp-admin/upload.php1,382 ▼64.24 ▼0.0196.04 ▼1.6242.21 ▼0.25
Btn /wp-admin/admin.php?page=contact-form-7-editor-button9042.0624.9426.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=contact-form-7-editor-button
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/cf7-editor-button/loader.php
    • > /wp-content/plugins/cf7-editor-button/contact-form-7-editor-button.php
  • 26× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Utils\\Options' not found in wp-content/plugins/cf7-editor-button/libraries/arisoft/core/controllers/class-controller-options.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\App\\Plugin' not found in wp-content/plugins/cf7-editor-button/includes/class-plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Controllers\\Display' not found in wp-content/plugins/cf7-editor-button/includes/controllers/settings/class-display.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Controllers\\Controller_Options' not found in wp-content/plugins/cf7-editor-button/libraries/arisoft/core/controllers/class-ajax-options.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Utils\\Options' not found in wp-content/plugins/cf7-editor-button/libraries/arisoft/core/app/class-installer-options.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Forms\\Field' not found in wp-content/plugins/cf7-editor-button/libraries/arisoft/core/forms/fields/class-select.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Utils\\Options' not found in wp-content/plugins/cf7-editor-button/libraries/arisoft/core/models/class-model-options.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Ari_Cf7_Button\\Helpers\\Helper' not found in wp-content/plugins/cf7-editor-button/includes/views/settings/tmpl/default.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Ari\\Controllers\\Controller_Options' not found in wp-content/plugins/cf7-editor-button/libraries/arisoft/core/controllers/class-display-options.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Ari_Cf7_Button\\Views\\Base' not found in wp-content/plugins/cf7-editor-button/includes/views/settings/class-html.php:6

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: You can look at the official readme.txt

cf7-editor-button/contact-form-7-editor-button.php 85% from 13 tests

Analyzing the main PHP file in "Contact Form 7 Editor Button" version 1.0.0
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("cf7-editor-button.php" instead of "contact-form-7-editor-button.php")

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
Success! There were no dangerous files found in this plugin1,973 lines of code in 52 files:
LanguageFilesBlank linesComment linesLines of code
PHP49621111,848
JavaScript1400117
CSS1014
SVG1004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.33
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces16
Interfaces0
Traits0
Classes42
▷ Abstract classes12.38%
▷ Concrete classes4197.62%
▷ Final classes24.88%
Methods143
▷ Static methods3524.48%
▷ Public methods10976.22%
▷ Protected methods2517.48%
▷ Private methods96.29%
Functions23
▷ Named functions521.74%
▷ Anonymous functions1878.26%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected