78% nf-merge-tag-addon

Code Review | Ninja Forms Merge Tag Addon

WordPress plugin Ninja Forms Merge Tag Addon scored78%from 54 tests.

About plugin

  • Plugin page: nf-merge-tag-addon
  • Plugin version: 2.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9
  • WordPress version: 6.3.1
  • First release: Mar 7, 2018
  • Latest release: Jan 26, 2022
  • Number of updates: 19
  • Update frequency: every 81.3 days
  • Top authors: Benjamin_Zekavica (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active /4,754 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.40MB] [CPU: ▼8.62ms] Passed 4 tests

This is a short check of server-side resources used by Ninja Forms Merge Tag Addon
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4345.45 ▲1.25
Dashboard /wp-admin3.80 ▲0.4156.13 ▼10.82
Posts /wp-admin/edit.php3.85 ▲0.4555.45 ▼2.70
Add New Post /wp-admin/post-new.php6.32 ▲0.3997.29 ▼22.20
Media Library /wp-admin/upload.php3.66 ▲0.3939.93 ▲2.30
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins3.8236.15

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 57 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Ninja Forms Merge Tag Addon
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲8814.26 ▼0.511.88 ▲0.2340.31 ▲3.34
Dashboard /wp-admin2,240 ▲605.51 ▼0.0787.51 ▼2.0649.31 ▲3.87
Posts /wp-admin/edit.php2,154 ▲542.16 ▲0.2135.83 ▼4.7541.10 ▲5.76
Add New Post /wp-admin/post-new.php1,576 ▲5018.35 ▼4.80598.20 ▼45.2765.02 ▲16.19
Media Library /wp-admin/upload.php1,450 ▲504.24 ▲0.08104.79 ▼3.4153.58 ▲5.54
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0072.1824.7235.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=tgmpa-install-plugins
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 11 occurences, only the last one shown
    • > GET request to /wp-admin/plugins.php?page=tgmpa-install-plugins
    • > POST request to /wp-cron.php?doing_wp_cron=1697551793.8827230930328369140625
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nf-merge-tag-addon/inc/plugin-check/pluginchecker.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/nf-merge-tag-addon/inc/plugin-check/plugin-install/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nf-merge-tag-addon/inc/i18n/nf-translation.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/nf-merge-tag-addon/inc/plugin-check/plugin-install/class-tgm-plugin-activation.php:2109
    • > PHP Fatal error
      Uncaught Error: Class 'NF_Abstracts_MergeTags' not found in wp-content/plugins/nf-merge-tag-addon/inc/merges/contents/class.nfmergecontent.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/nf-merge-tag-addon/inc/merges/contents/merge-content-loader.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: ninjaforms, wordpress content, addon, merge tag, ninja forms...

nf-merge-tag-addon/merge-ninja-addon.php 85% from 13 tests

The primary PHP file in "Ninja Forms Merge Tag Addon" version 2.8 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("nf-merge-tag-addon.php" instead of "merge-ninja-addon.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin6,788 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PO File181,4592,0034,886
PHP105191,6671,890
Markdown17012

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity43.00
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods104
▷ Static methods54.81%
▷ Public methods7975.96%
▷ Protected methods2524.04%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin