78% cleverreach-wp

Code Review | CleverReach® WP

WordPress plugin CleverReach® WP scored78%from 54 tests.

About plugin

  • Plugin page: cleverreach-wp
  • Plugin version: 1.5.20
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 2, 2019
  • Latest release: Aug 24, 2023
  • Number of updates: 56
  • Update frequency: every 29.8 days
  • Top authors: cleverreach43 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /62,377 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▲2.78ms] Passed 4 tests

A check of server-side resources used by CleverReach® WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1443.72 ▲3.39
Dashboard /wp-admin3.44 ▲0.1449.20 ▲2.89
Posts /wp-admin/edit.php3.55 ▲0.2054.61 ▲12.04
Add New Post /wp-admin/post-new.php6.02 ▲0.1386.15 ▲0.77
Media Library /wp-admin/upload.php3.36 ▲0.1337.49 ▲4.07

Server storage [IO: ▲8.68MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 392 new files
Database: 4 new tables, 6 new options
New tables
wp_cleverreach_entity
wp_cleverreach_queue
wp_cleverreach_process
wp_cleverreach_config
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for CleverReach® WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲10913.77 ▼0.851.84 ▲0.1939.43 ▼4.81
Dashboard /wp-admin2,222 ▲335.79 ▲0.88105.98 ▼11.8136.41 ▼9.31
Posts /wp-admin/edit.php2,108 ▲192.00 ▼0.0141.02 ▲6.4834.93 ▲2.89
Add New Post /wp-admin/post-new.php1,532 ▲1817.68 ▲0.04671.38 ▲2.9355.29 ▼9.24
Media Library /wp-admin/upload.php1,410 ▲224.28 ▲0.0796.82 ▼0.0441.58 ▼4.48

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/cleverreach-wp/resources/views/wrapper-end.php
    • > /wp-content/plugins/cleverreach-wp/resources/views/recaptcha.php
    • > /wp-content/plugins/cleverreach-wp/resources/views/wrapper-start.php
    • > /wp-content/plugins/cleverreach-wp/tests/bootstrap.php
  • 166× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\BusinessLogic\\Sync\\InitialSyncTask' not found in wp-content/plugins/cleverreach-wp/Components/Sync/class-initial-sync-task.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\Components\\Utility\\Database' not found in wp-content/plugins/cleverreach-wp/resources/views/register-form-newsletter.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/cleverreach-wp/resources/views/signup-form-tag-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\BusinessLogic\\Sync\\BaseSyncTask' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/BusinessLogic/Sync/RefreshUserInfoTask.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\BusinessLogic\\Sync\\BaseSyncTask' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/BusinessLogic/Sync/CampaignOrderSync.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\BusinessLogic\\Sync\\BaseSyncTask' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/BusinessLogic/Sync/SendDoiEmailsTask.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'CleverReach\\WordPress\\IntegrationCore\\Infrastructure\\Interfaces\\Exposed\\TaskRunnerStatusStorage' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/Infrastructure/TaskExecution/TaskRunnerStatusStorage.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\Infrastructure\\Exceptions\\BaseException' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/Infrastructure/TaskExecution/Exceptions/ProcessStorageGetException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\BusinessLogic\\Scheduler\\Models\\Schedule' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/BusinessLogic/Scheduler/Models/HourlySchedule.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'CleverReach\\WordPress\\IntegrationCore\\BusinessLogic\\Utility\\ArticleSearch\\Schema\\SchemaAttribute' not found in wp-content/plugins/cleverreach-wp/vendor/cleverreach/integration-core/src/BusinessLogic/Utility/ArticleSearch/Schema/ComplexSchemaAttribute.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: newsletter, email automation, email, follow up newsletter, integration...

cleverreach-wp/cleverreach-wp.php 92% from 13 tests

The entry point to "CleverReach® WP" version 1.5.20 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 166 characters long)

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
There were no executable files found in this plugin33,699 lines of code in 332 files:
LanguageFilesBlank linesComment linesLines of code
PHP2733,88113,91316,470
CSS5252157,760
PO File181,4372,5773,935
JavaScript256198542,752
SVG3012,143
Markdown1810458
JSON300126
XML20034
Bourne Again Shell16018
Bourne Shell1103

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity6.70
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces54
Interfaces18
Traits0
Classes226
▷ Abstract classes2511.06%
▷ Concrete classes20188.94%
▷ Final classes10.50%
Methods1,580
▷ Static methods1257.91%
▷ Public methods1,09769.43%
▷ Protected methods16210.25%
▷ Private methods32120.32%
Functions38
▷ Named functions37.89%
▷ Anonymous functions3592.11%
Constants208
▷ Global constants10.48%
▷ Class constants20799.52%
▷ Public constants207100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
28 PNG files occupy 0.33MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cleverreach/integration-core/dist/resources/img/nps0.png2.02KB0.95KB▼ 52.81%
resources/images/nps7-8.png1.65KB0.69KB▼ 58.16%
resources/images/icon_hello.png8.33KB4.05KB▼ 51.39%
resources/images/cleverreach_logo_envelope.png0.41KB0.43KB0.00%
vendor/cleverreach/integration-core/dist/resources/img/feedback.png3.43KB1.82KB▼ 46.84%