77% cta-builder

Code Review | Call To Action Builder

WordPress plugin Call To Action Builder scored77%from 54 tests.

About plugin

  • Plugin page: cta-builder
  • Plugin version: 1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Feb 21, 2022
  • Latest release: Jan 3, 2023
  • Number of updates: 9
  • Update frequency: every 35.4 days
  • Top authors: therightsw (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /320 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼6.90ms] Passed 4 tests

Server-side resources used by Call To Action Builder
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1841.44 ▼2.17
Dashboard /wp-admin3.48 ▲0.1446.47 ▼17.68
Posts /wp-admin/edit.php3.59 ▲0.2447.46 ▼2.48
Add New Post /wp-admin/post-new.php6.12 ▲0.2491.65 ▼5.26
Media Library /wp-admin/upload.php3.40 ▲0.1734.26 ▲0.70
All CTA /wp-admin/edit.php?post_type=cta3.4536.90
Add New CTA /wp-admin/post-new.php?post_type=cta3.4646.21

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Call To Action Builder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲13913.43 ▼0.929.21 ▲7.5244.22 ▲0.79
Dashboard /wp-admin2,221 ▲415.58 ▼0.0687.20 ▼5.6935.79 ▼7.40
Posts /wp-admin/edit.php2,123 ▲201.99 ▲0.0133.81 ▼3.3232.45 ▼4.64
Add New Post /wp-admin/post-new.php1,545 ▲1923.09 ▲0.11683.11 ▲81.6956.28 ▼3.89
Media Library /wp-admin/upload.php1,423 ▲204.19 ▲0.0199.79 ▲0.6141.80 ▲0.66
All CTA /wp-admin/edit.php?post_type=cta1,1431.9734.2627.34
Add New CTA /wp-admin/post-new.php?post_type=cta2,1393.6660.7134.16

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cta-builder/includes/trs_shortcode.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cta-builder/includes/trs_create_meta_boxes.php:46
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cta-builder/includes/trs_cta_image_properties_render_metabox.php:253
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cta-builder/includes/trs_cta_text_properties_render_metabox.php:237
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cta-builder/includes/trs_cta_banner_sizes_render_metabox.php:84
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/cta-builder/trs_cta_builder.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cta-builder/functions.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/cta-builder/includes/functions.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/cta-builder/trs_cta_activate.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cta-builder/includes/trs_cta_register_widget.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/post-new.php?post_type=cta
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=cta 492 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=cta
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=cta 510 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=cta
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=cta 603 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/post-new.php?post_type=cta
    • > Rendering (warning) in unknown
    /wp-admin/post-new.php?post_type=cta 619 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in cta-builder/assets to your readme.txt
  • Tags: Too many tags (13 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

cta-builder/trs_cta_builder.php 77% from 13 tests

Analyzing the main PHP file in "Call To Action Builder" version 1.1
The following require your attention:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Name the main plugin file the same as the plugin slug ("cta-builder.php" instead of "trs_cta_builder.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 438 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin1,391 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP161702421,260
CSS2184117
JavaScript12014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods675.00%
▷ Protected methods225.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG files were detected