78% styler-for-ninja-forms-lite

Code Review | Styler for Ninja Forms

WordPress plugin Styler for Ninja Forms scored78%from 54 tests.

About plugin

  • Plugin page: styler-for-ninja-...
  • Plugin version: 3.3.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.1
  • WordPress version: 6.3.1
  • First release: Mar 22, 2019
  • Latest release: Oct 26, 2022
  • Number of updates: 18
  • Update frequency: every 73.2 days
  • Top authors: wpmonks (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /24,994 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.18MB] [CPU: ▼2.82ms] Passed 4 tests

An overview of server-side resources used by Styler for Ninja Forms
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1739.90 ▼3.45
Dashboard /wp-admin3.49 ▲0.1846.89 ▼4.43
Posts /wp-admin/edit.php3.60 ▲0.2451.29 ▲4.25
Add New Post /wp-admin/post-new.php6.07 ▲0.1881.20 ▼5.93
Media Library /wp-admin/upload.php3.41 ▲0.1837.85 ▲2.54
Add-Ons /wp-admin/admin.php?page=sfnf-addons3.3732.12
Documentation /wp-admin/admin.php?page=sfnf-documentation3.3731.45
Licenses /wp-admin/admin.php?page=sfnf_licenses3.3729.02

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 101 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
sfnf_licenses

Browser metrics Passed 4 tests

Checking browser requirements for Styler for Ninja Forms
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,838 ▲9213.20 ▼1.101.74 ▼0.2147.30 ▲6.30
Dashboard /wp-admin2,241 ▲504.88 ▼1.00104.03 ▲5.1537.61 ▼5.88
Posts /wp-admin/edit.php2,127 ▲352.03 ▼0.0140.54 ▼6.9336.35 ▼2.13
Add New Post /wp-admin/post-new.php1,546 ▲2723.32 ▼0.10650.68 ▲6.9158.98 ▲8.77
Media Library /wp-admin/upload.php1,426 ▲384.24 ▲0.0799.03 ▼8.1543.23 ▼4.81
Add-Ons /wp-admin/admin.php?page=sfnf-addons8392.0225.6031.68
Documentation /wp-admin/admin.php?page=sfnf-documentation1,0582.2025.5142.35
Licenses /wp-admin/admin.php?page=sfnf_licenses8112.0725.0827.57

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • sfnf_licenses
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/styler-for-ninja-forms-lite/ninja-forms-styler-lite.php
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/styler-for-ninja-forms-lite/display/class-styles.php:2
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styler-for-ninja-forms-lite/includes/outer-shadow.php on line 3
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styler-for-ninja-forms-lite/includes/form-title.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styler-for-ninja-forms-lite/includes/checkbox-inputs.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styler-for-ninja-forms-lite/includes/submit-button.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styler-for-ninja-forms-lite/includes/form-select.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styler-for-ninja-forms-lite/includes/field-labels.php:4
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/styler-for-ninja-forms-lite/includes/confirmation-message.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styler-for-ninja-forms-lite/includes/general-settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to a member function add_section() on null in wp-content/plugins/styler-for-ninja-forms-lite/includes/radio-inputs.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Plugin Admin)
You can look at the official readme.txt

styler-for-ninja-forms-lite/ninja-forms-styler-lite.php 92% from 13 tests

"Styler for Ninja Forms" version 3.3.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("styler-for-ninja-forms-lite.php" instead of "ninja-forms-styler-lite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin9,111 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
PHP369255125,931
JavaScript64951701,384
CSS52141531,280
HTML27701516

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity11.55
▷ Minimum class complexity1.00
▷ Maximum class complexity110.00
Average method complexity4.30
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods5890.62%
▷ Protected methods00.00%
▷ Private methods69.38%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
23 PNG files occupy 4.39MB with 1.89MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin-menu/images/welcome/cs-theme.png2.43KB1.61KB▼ 33.53%
admin-menu/images/donate-button.png13.46KB6.06KB▼ 55.01%
admin-menu/images/welcome/field-icons.png3.79KB2.17KB▼ 42.60%
admin-menu/images/step1.png45.96KB16.64KB▼ 63.79%
admin-menu/images/welcome/addons.png1.99KB1.58KB▼ 20.57%