79% cleverreach

Code Review | Newsletter Sign-Up for CleverReach

WordPress plugin Newsletter Sign-Up for CleverReach scored79%from 54 tests.

About plugin

  • Plugin page: cleverreach
  • Plugin version: 2.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.3
  • WordPress version: 6.3.1
  • First release: May 13, 2015
  • Latest release: Aug 24, 2023
  • Number of updates: 41
  • Update frequency: every 73.8 days
  • Top authors: haet (56.1%)cleverreach43 (46.34%)

Code review

54 tests

User reviews

13 reviews

Install metrics

2,000+ active /52,955 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.52MB] [CPU: ▲1.84ms] Passed 4 tests

This is a short check of server-side resources used by Newsletter Sign-Up for CleverReach
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.96 ▲0.5044.35 ▼1.40
Dashboard /wp-admin3.84 ▲0.5361.98 ▲8.86
Posts /wp-admin/edit.php3.89 ▲0.5356.37 ▲4.62
Add New Post /wp-admin/post-new.php6.44 ▲0.5590.07 ▲0.03
Media Library /wp-admin/upload.php3.76 ▲0.5342.52 ▲4.09
Integrations /wp-admin/admin.php?page=cleverreach-integrations3.7037.15
CleverReach /wp-admin/admin.php?page=cleverreach3.7238.98
Form Builder /wp-admin/admin.php?page=cleverreach-forms3.7542.28

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 77 new files
Database: no new tables, 8 new options
New WordPress options
widget_cleverreach_mail_widget
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
CR_SCHEMA_VERSION
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Newsletter Sign-Up for CleverReach
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲14413.51 ▼1.228.27 ▲6.1537.75 ▼5.28
Dashboard /wp-admin2,213 ▲335.50 ▼0.1587.61 ▼9.2177.28 ▲32.62
Posts /wp-admin/edit.php2,136 ▲361.98 ▼0.0538.47 ▲1.6736.45 ▲3.01
Add New Post /wp-admin/post-new.php1,705 ▲17422.40 ▼0.41747.60 ▲125.8552.03 ▲0.27
Media Library /wp-admin/upload.php1,433 ▲334.23 ▼0.0399.87 ▼8.5463.19 ▲14.34
Integrations /wp-admin/admin.php?page=cleverreach-integrations9551.9637.4129.59
CleverReach /wp-admin/admin.php?page=cleverreach8941.9733.0329.70
Form Builder /wp-admin/admin.php?page=cleverreach-forms9641.7824.8832.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_cleverreach_mail_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • 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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/cleverreach/resources/views/storefront/form.php
    • > /wp-content/plugins/cleverreach/resources/views/admin/form/field-label-position.php
  • 52× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/cleverreach/resources/views/admin/settings-general.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/cleverreach/resources/views/storefront/form.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cleverreach/resources/views/admin/sidebar-features.php:3
    • > PHP Notice
      Undefined variable: data in wp-content/plugins/cleverreach/resources/views/admin/integrations/field-name-attribute-selection.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cleverreach/resources/views/admin/integrations/field-name-attribute-selection.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\ewsletter\\Database\\Abstract_Migration' not found in wp-content/plugins/cleverreach/database/Migrations/migration.v.2.3.0.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cleverreach/resources/views/admin/settings-general.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/cleverreach/resources/views/admin/form/field-message.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cleverreach/resources/views/admin/sidebar-woocommerce.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cleverreach/resources/views/admin/settings-form.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: email, woocommerce, widget, marketing, campaign...

cleverreach/cleverreach.php Passed 13 tests

The main PHP file in "Newsletter Sign-Up for CleverReach" ver. 2.3.4 adds more information about the plugin and also serves as the entry point for this plugin
60 characters long description:
Easily integrate a CleverReach Sign-Up Form in your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin4,068 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP626191,3713,281
PO File1118144350
CSS2533238
JavaScript33012183
JSON20016

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity8.38
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces17
Interfaces0
Traits0
Classes34
▷ Abstract classes25.88%
▷ Concrete classes3294.12%
▷ Final classes00.00%
Methods209
▷ Static methods199.09%
▷ Public methods16478.47%
▷ Protected methods104.78%
▷ Private methods3516.75%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants26
▷ Global constants00.00%
▷ Class constants26100.00%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/menu-icon.png0.48KB0.33KB▼ 30.63%
resources/images/logo.png5.58KB2.52KB▼ 54.84%