83% popup-addon-for-ninja-forms

Code Review | Popup addon for Ninja Forms

WordPress plugin Popup addon for Ninja Forms scored 83% from 54 tests.

About plugin

  • Plugin page: popup-addon-for-n...
  • Plugin version: 3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Jul 28, 2017
  • Latest release: Jan 21, 2023
  • Number of updates: 59
  • Update frequency: every 34.0 days
  • Top authors: aman086 (100%)Otto42 (3.39%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active / 30,936 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 gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼6.23ms] Passed 4 tests

A check of server-side resources used by Popup addon for Ninja Forms
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1441.92 ▼0.92
Dashboard /wp-admin3.44 ▲0.1348.61 ▲1.17
Posts /wp-admin/edit.php3.55 ▲0.2045.71 ▼7.56
Add New Post /wp-admin/post-new.php6.04 ▲0.1690.02 ▼17.62
Media Library /wp-admin/upload.php3.36 ▲0.1335.66 ▲1.19
Add New /wp-admin/post-new.php?post_type=nf-popups3.4043.04
Licenses /wp-admin/edit.php?post_type=nf-popups&page=nf_popups_licenses3.3332.26
NF Popups /wp-admin/edit.php?post_type=nf-popups3.4035.28

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
nf_popups_licenses
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Popup addon for Ninja Forms
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,933 ▲19813.59 ▼0.706.83 ▲5.0043.69 ▲1.24
Dashboard /wp-admin2,248 ▲635.85 ▲0.0499.03 ▼1.0238.75 ▼6.88
Posts /wp-admin/edit.php2,130 ▲412.03 ▼0.1135.92 ▼4.9334.91 ▼0.27
Add New Post /wp-admin/post-new.php1,565 ▲4223.19 ▼0.07663.59 ▲60.3262.70 ▲14.77
Media Library /wp-admin/upload.php1,430 ▲424.31 ▲0.1596.12 ▼3.0041.41 ▼6.46
Add New /wp-admin/post-new.php?post_type=nf-popups1,5702.5549.8852.66
Licenses /wp-admin/edit.php?post_type=nf-popups&page=nf_popups_licenses8101.7124.6127.68
NF Popups /wp-admin/edit.php?post_type=nf-popups1,0911.9830.8029.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • nf_popups_licenses
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× 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/popup-addon-for-ninja-forms/inc/admin/class-nf-popups-customizer.php:253
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popup-addon-for-ninja-forms/inc/admin/class-nf-popups-postype.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'NF_Popups_Customizer' not found in wp-content/plugins/popup-addon-for-ninja-forms/inc/admin/views/html-popup-template-preview.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popup-addon-for-ninja-forms/inc/admin/class-nf-popups-settings-metabox.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popup-addon-for-ninja-forms/inc/admin/class-nf-popups-licenses.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

popup-addon-for-ninja-forms/nf-popups.php 85% from 13 tests

Analyzing the main PHP file in "Popup addon for Ninja Forms" version 3.4
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("popup-addon-for-ninja-forms.php" instead of "nf-popups.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,682 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP111941821,009
CSS37013465
JavaScript41820208

PHP code Passed 2 tests

This is a very shot 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.20
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods41
▷ Static methods512.20%
▷ Public methods3790.24%
▷ Protected methods00.00%
▷ Private methods49.76%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/active.png1.63KB1.34KB▼ 17.74%
images/inactive.png1.58KB1.32KB▼ 16.60%