78% caldera-forms-translation

Code Review | Caldera Forms Translation

WordPress plugin Caldera Forms Translation scored78%from 54 tests.

About plugin

  • Plugin page: caldera-forms-tra...
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2016
  • Latest release: Dec 15, 2017
  • Number of updates: 13
  • Update frequency: every 30.7 days
  • Top authors: Shelob9 (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

800+ active /11,259 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.02MB] [CPU: ▼7.00ms] Passed 4 tests

A check of server-side resources used by Caldera Forms Translation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.17 ▼8.11
Dashboard /wp-admin3.33 ▼0.0143.92 ▼20.84
Posts /wp-admin/edit.php3.38 ▲0.0348.59 ▲2.41
Add New Post /wp-admin/post-new.php5.91 ▲0.0390.54 ▼1.23
Media Library /wp-admin/upload.php3.25 ▲0.0334.98 ▲2.20

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Caldera Forms Translation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5413.34 ▼1.041.81 ▼0.2442.49 ▼0.12
Dashboard /wp-admin2,209 ▲214.84 ▼0.08107.49 ▼13.0538.23 ▼6.52
Posts /wp-admin/edit.php2,089 ▼32.00 ▼0.0239.58 ▲0.9434.51 ▼1.00
Add New Post /wp-admin/post-new.php1,542 ▲2218.41 ▼4.74631.26 ▼35.7369.70 ▲13.85
Media Library /wp-admin/upload.php1,388 ▼34.21 ▼0.0195.88 ▼4.0441.38 ▼9.59

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

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
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/caldera-forms-translation/fields/picker/preview.php
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CF_Translate_Filter' not found in wp-content/plugins/caldera-forms-translation/classes/pickeroptions.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Caldera_Forms_Forms' not found in wp-content/plugins/caldera-forms-translation/views/main-page.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/caldera-forms-translation/fields/picker/field.php:10
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/caldera-forms-translation/classes/factories.php on line 134
    • > PHP Fatal error
      Uncaught Error: Class 'CF_Translate_Filter' not found in wp-content/plugins/caldera-forms-translation/classes/success.php:3
    • > PHP Notice
      Undefined variable: field_label in wp-content/plugins/caldera-forms-translation/fields/picker/field.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/caldera-forms-translation/fields/picker/config_template.php:3
    • > PHP Notice
      Undefined variable: field_before in wp-content/plugins/caldera-forms-translation/fields/picker/field.php on line 9
    • > PHP Fatal error
      Uncaught Error: Interface 'Caldera_Forms_API_Route' not found in wp-content/plugins/caldera-forms-translation/classes/api.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Caldera_Forms_Object' not found in wp-content/plugins/caldera-forms-translation/classes/field.php:12

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: Screenshot #1 (Translation Settings) image not found
You can take inspiration from this readme.txt

caldera-forms-translation/cf-translate.php 85% from 13 tests

The entry point to "Caldera Forms Translation" version 1.2.1 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("caldera-forms-translation.php" instead of "cf-translate.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin16,622 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
JSON30012,621
PHP303981,0821,814
JavaScript222826591,602
Vuejs Component10780572
Markdown18013

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity11.56
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods102
▷ Static methods1211.76%
▷ Public methods8280.39%
▷ Protected methods1716.67%
▷ Private methods32.94%
Functions14
▷ Named functions1392.86%
▷ Anonymous functions17.14%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin