94% optin-forms

Code Review | Optin Forms - Simple List Building Plugin for WordPress

WordPress plugin Optin Forms - Simple List Building Plugin for WordPress scored 94% from 54 tests.

About plugin

  • Plugin page: optin-forms
  • Plugin version: 1.2.9.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-5.8
  • WordPress version: 5.8.1
  • First release: Mar 6, 2014
  • Latest release: Oct 26, 2021
  • Number of updates: 122
  • Update frequency: every 22.9 days
  • Top authors: FancyThemes (52.46%)wpkube (31.97%)brs (17.21%)

Code review

54 tests

User reviews

72 reviews

Install metrics

9,000+ active / 384,047 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▼105.08ms] Passed 4 tests

A check of server-side resources used by Optin Forms - Simple List Building Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.35 ▲0.5172.45 ▲44.54
Dashboard /wp-admin3.66 ▲0.5974.58 ▲32.53
Posts /wp-admin/edit.php3.76 ▲0.6577.78 ▲46.76
Add New Post /wp-admin/post-new.php6.02 ▲0.58120.57 ▼536.81
Media Library /wp-admin/upload.php3.60 ▲0.5964.72 ▲39.44

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 101 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Optin Forms - Simple List Building Plugin for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,848 ▲24715.99 ▲0.038.61 ▲1.8376.08 ▲2.04
Dashboard /wp-admin2,948 ▲526.26 ▲0.02113.98 ▼22.13179.37 ▼2.05
Posts /wp-admin/edit.php2,763 ▲263.25 ▼0.0962.71 ▼1.38137.18 ▼3.05
Add New Post /wp-admin/post-new.php1,895 ▼1,84015.42 ▼3.05409.45 ▼5.76186.87 ▲20.47
Media Library /wp-admin/upload.php1,765 ▲135.57 ▲0.06129.28 ▼10.24203.21 ▲23.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 26× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/optin-forms/includes/options-email-solution.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/optin-forms/includes/options-form-1.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/optin-forms/includes/register-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/optin-forms/includes/functions-form-5.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function optinforms_form3_default_background() in wp-content/plugins/optin-forms/includes/preview-form-3.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/optin-forms/includes/options-form-placement.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/optin-forms/includes/functions-form-4.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/optin-forms/includes/functions-form-6.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/optin-forms/includes/options-form-5.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/optin-forms/includes/functions-form-2.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

optin-forms/optin-forms.php Passed 13 tests

This is the main PHP file of "Optin Forms - Simple List Building Plugin for WordPress" version 1.2.9.9, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
133 characters long description:
Create beautiful optin forms with ease. Choose a form design, customize it, and add your form to your blog with a simple mouse-click.

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
No dangerous file extensions were detected7,768 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP269266167,001
CSS35431418
JavaScript64628349

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity33.00
▷ Minimum class complexity33.00
▷ Maximum class complexity33.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions303
▷ Named functions303100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
54 PNG files occupy 1.01MB with 0.57MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/support-convertkit-2-004.png5.40KB2.69KB▼ 50.13%
images/support-icontact-002.png71.00KB35.48KB▼ 50.03%
images/support-icontact-007.png6.71KB3.21KB▼ 52.23%
images/support-icontact-001.png17.84KB6.71KB▼ 62.38%
images/support-interspire-007.png43.57KB15.45KB▼ 64.55%