84% ninja-forms-modal

Code Review | Ninja Forms - Modal

WordPress plugin Ninja Forms - Modal scored84%from 54 tests.

About plugin

  • Plugin page: ninja-forms-modal
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-3.7.1
  • WordPress version: 6.3.1
  • First release: Nov 19, 2013
  • Latest release: Feb 13, 2015
  • Number of updates: 11
  • Update frequency: every 41.0 days
  • Top authors: jameslaws (72.73%)kstover (36.36%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /26,639 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼4.03ms] Passed 4 tests

Server-side resources used by Ninja Forms - Modal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.82 ▼3.88
Dashboard /wp-admin3.31 ▲0.0047.15 ▼7.17
Posts /wp-admin/edit.php3.36 ▲0.0053.92 ▲5.34
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.11 ▲0.64
Media Library /wp-admin/upload.php3.23 ▲0.0034.43 ▼5.70

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Ninja Forms - Modal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.35 ▼1.471.79 ▼0.0142.12 ▲1.56
Dashboard /wp-admin2,206 ▲155.86 ▲0.0199.15 ▼4.5344.70 ▼2.28
Posts /wp-admin/edit.php2,089 ▼02.05 ▼0.0139.97 ▲3.0136.66 ▼3.04
Add New Post /wp-admin/post-new.php1,514 ▼717.74 ▼5.56611.90 ▼94.0752.52 ▲0.95
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.01100.23 ▼3.3444.13 ▼1.21

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
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • 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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/ninja-forms-modal/ninja-forms-modal.php:14
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/ninja-forms-modal/ninja-forms-modal.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/ninja-forms-modal/includes/shortcodes.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: contact, popup, forms, modal, form...

ninja-forms-modal/ninja-forms-modal.php 92% from 13 tests

The main PHP script in "Ninja Forms - Modal" version 1.0.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Domain Path: The domain path is invalid: folder "/lang/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin199 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2212279
JavaScript218462
CSS192458

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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