78% smartarget-click-to-call

Code Review | Smartarget Click to call

WordPress plugin Smartarget Click to call scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-click-...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Nov 14, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 14
  • Update frequency: every 45.4 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /418 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.05ms] Passed 4 tests

Analyzing server-side resources used by Smartarget Click to call
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0753.30 ▲7.17
Dashboard /wp-admin3.37 ▲0.0253.06 ▼15.43
Posts /wp-admin/edit.php3.48 ▲0.1353.34 ▲8.90
Add New Post /wp-admin/post-new.php5.97 ▲0.0898.23 ▼20.81
Media Library /wp-admin/upload.php3.29 ▲0.0645.55 ▲8.87
Smartarget Click to call /wp-admin/options-general.php?page=smartarget_call_button3.2635.25

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Smartarget Click to call
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16020.91 ▲6.568.64 ▲6.8539.39 ▼4.18
Dashboard /wp-admin2,205 ▲3110.64 ▲5.10162.79 ▲66.8538.36 ▼5.15
Posts /wp-admin/edit.php2,119 ▲197.27 ▲5.28114.94 ▲73.6831.72 ▼3.09
Add New Post /wp-admin/post-new.php1,694 ▲15927.32 ▲9.05714.49 ▲46.8968.11 ▲4.95
Media Library /wp-admin/upload.php1,407 ▲79.52 ▲5.35198.21 ▲88.3846.43 ▲2.63
Smartarget Click to call /wp-admin/options-general.php?page=smartarget_call_button1,80610.77203.7596.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/smartarget-click-to-call/public/partials/smartarget-call-button-public-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-click-to-call/admin/partials/smartarget-call-button-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were 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
6 plugin tags: contact us, callback, form, contact, smartarget...

smartarget-click-to-call/smartarget-call-button.php 85% from 13 tests

"Smartarget Click to call" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important 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: Name the main plugin file the same as the plugin slug ("smartarget-click-to-call.php" instead of "smartarget-call-button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin430 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12130522225
JavaScript351,397205
CSS1040

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected