89% optinly

Code Review | Optinly - Exit Intent, Newsletter Popups, Gamification & Opt-in Forms

WordPress plugin Optinly - Exit Intent, Newsletter Popups, Gamification & Opt-in Forms scored89%from 54 tests.

About plugin

  • Plugin page: optinly
  • Plugin version: 1.0.18
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6.1-6.3.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2020
  • Latest release: Oct 18, 2023
  • Number of updates: 48
  • Update frequency: every 25.3 days
  • Top authors: optinlyhq (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

1,000+ active /16,497 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼2.89ms] Passed 4 tests

Analyzing server-side resources used by Optinly - Exit Intent, Newsletter Popups, Gamification & Opt-in Forms
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1034.99 ▼5.56
Dashboard /wp-admin3.42 ▲0.1146.44 ▼1.91
Posts /wp-admin/edit.php3.53 ▲0.1748.95 ▼1.12
Add New Post /wp-admin/post-new.php6.00 ▲0.1193.92 ▼2.97
Media Library /wp-admin/upload.php3.34 ▲0.1135.14 ▲0.95

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Optinly - Exit Intent, Newsletter Popups, Gamification & Opt-in Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.32 ▼0.041.66 ▼0.0336.82 ▼1.38
Dashboard /wp-admin2,211 ▲375.55 ▼0.0680.21 ▼10.0340.05 ▼0.90
Posts /wp-admin/edit.php2,116 ▲161.98 ▲0.0339.20 ▲1.6835.73 ▲1.28
Add New Post /wp-admin/post-new.php1,548 ▲2025.05 ▲1.93632.52 ▲24.0668.40 ▲10.45
Media Library /wp-admin/upload.php1,419 ▲194.18 ▲0.0393.10 ▼9.4742.75 ▼0.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

optinly/optinly.php 92% from 13 tests

The main PHP script in "Optinly - Exit Intent, Newsletter Popups, Gamification & Opt-in Forms" version 1.0.18 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

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
Everything looks great! No dangerous files found in this plugin1,208 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP191923521,046
JavaScript11028114
CSS18047
JSON1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods62
▷ Static methods34.84%
▷ Public methods6198.39%
▷ Protected methods00.00%
▷ Private methods11.61%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.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