83% recapture-for-restrict-content-pro

Code Review | WordPress abandoned cart recovery and email marketing for Restrict Content Pro by Recapture

WordPress plugin WordPress abandoned cart recovery and email marketing for Restrict Content Pro by Recapture scored83%from 54 tests.

About plugin

  • Plugin page: recapture-for-res...
  • Plugin version: 1.0.15
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-6.3
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Sep 2, 2023
  • Number of updates: 31
  • Update frequency: every 38.3 days
  • Top authors: recaptureio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /2,423 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
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.63ms] Passed 4 tests

Server-side resources used by WordPress abandoned cart recovery and email marketing for Restrict Content Pro by Recapture
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1639.95 ▼7.02
Dashboard /wp-admin3.52 ▲0.2251.31 ▼1.90
Posts /wp-admin/edit.php3.57 ▲0.2254.51 ▼0.67
Add New Post /wp-admin/post-new.php6.04 ▲0.1694.79 ▲4.76
Media Library /wp-admin/upload.php3.38 ▲0.1638.10 ▲3.08

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress abandoned cart recovery and email marketing for Restrict Content Pro by Recapture
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,798 ▲1214.62 ▲0.281.69 ▼0.3541.22 ▼0.95
Dashboard /wp-admin2,204 ▲305.55 ▲0.0485.99 ▼8.2146.09 ▼4.46
Posts /wp-admin/edit.php2,110 ▲102.01 ▼0.0140.20 ▲0.3639.03 ▼0.47
Add New Post /wp-admin/post-new.php1,537 ▲1123.38 ▼0.14675.14 ▼10.1575.11 ▲22.79
Media Library /wp-admin/upload.php1,406 ▲64.17 ▼0.13105.88 ▼2.5046.61 ▼0.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'RecaptureBasePlatform' not found in wp-content/plugins/recapture-for-restrict-content-pro/platforms/class-woocommerce.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RecaptureBasePlatform' not found in wp-content/plugins/recapture-for-restrict-content-pro/platforms/class-rcp.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recapture-for-restrict-content-pro/recapture.php:690
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/recapture-for-restrict-content-pro/templates/reviews.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'RecaptureBasePlatform' not found in wp-content/plugins/recapture-for-restrict-content-pro/platforms/class-edd.php:15

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Experience the famous 5-minute install with Recapture), #2 (Configure your site settings once you're connected), #3 (Activate your campaigns in Recapture to start increasing sales!)
The official readme.txt is a good inspiration

recapture-for-restrict-content-pro/recapture.php 85% from 13 tests

The principal PHP file in "WordPress abandoned cart recovery and email marketing for Restrict Content Pro by Recapture" v. 1.0.15 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("recapture-for-restrict-content-pro.php" instead of "recapture.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin1,951 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP73151661,336
JavaScript56648376
CSS2112180
PO File1151759

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity16.33
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods111
▷ Static methods4742.34%
▷ Public methods10695.50%
▷ Protected methods32.70%
▷ Private methods21.80%
Functions6
▷ Named functions233.33%
▷ Anonymous functions466.67%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/recapture.png1.31KB0.32KB▼ 75.47%