83% ninja-forms-layout

Code Review | Ninja Form Layout

WordPress plugin Ninja Form Layout scored83%from 54 tests.

About plugin

  • Plugin page: ninja-forms-layout
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.6-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2014
  • Latest release: Dec 28, 2015
  • Number of updates: 12
  • Update frequency: every 34.6 days
  • Top authors: marclloyd77 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

500+ active /22,260 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.02MB] [CPU: ▼5.04ms] Passed 4 tests

Server-side resources used by Ninja Form Layout
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.73 ▼2.63
Dashboard /wp-admin3.32 ▲0.0253.05 ▼0.54
Posts /wp-admin/edit.php3.37 ▲0.0245.97 ▼8.01
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.79 ▼8.99
Media Library /wp-admin/upload.php3.25 ▲0.0240.14 ▲5.87

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Ninja Form Layout
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▲0.171.65 ▼0.2141.19 ▼2.65
Dashboard /wp-admin2,195 ▲215.58 ▼0.0386.95 ▼8.6739.21 ▼1.68
Posts /wp-admin/edit.php2,100 ▼31.99 ▼0.0035.79 ▼6.9134.18 ▼6.92
Add New Post /wp-admin/post-new.php1,526 ▼223.10 ▼0.18681.83 ▲24.5252.63 ▲1.19
Media Library /wp-admin/upload.php1,403 ▲64.21 ▲0.0099.97 ▼2.0546.42 ▼2.11

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% 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 50% 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 items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ninja-forms-layout/ninja-form-layout.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Add images for these screenshots: #1 (Fieldset start element.), #2 (Additional fieldset and div opions.)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === ninja-forms-layout === )
The official readme.txt might help

ninja-forms-layout/ninja-form-layout.php 92% from 13 tests

The main PHP file in "Ninja Form Layout" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ninja-forms-layout.php" instead of "ninja-form-layout.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin122 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12814122

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.53MB with 0.34MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png513.22KB211.92KB▼ 58.71%
assets/screenshot-2.png24.74KB7.12KB▼ 71.23%