84% acf-ninjaforms-add-on

Code Review | Advanced Custom Fields: Ninjaforms Add-on

WordPress plugin Advanced Custom Fields: Ninjaforms Add-on scored84%from 54 tests.

About plugin

  • Plugin page: acf-ninjaforms-ad...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.8
  • WordPress version: 6.3.1
  • First release: Jun 8, 2017
  • Latest release: Oct 4, 2017
  • Number of updates: 4
  • Update frequency: every 29.5 days
  • Top authors: DannyvanHolten (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /11,915 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
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.33ms] Passed 4 tests

An overview of server-side resources used by Advanced Custom Fields: Ninjaforms Add-on
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0834.34 ▼4.13
Dashboard /wp-admin3.38 ▲0.0342.11 ▼18.67
Posts /wp-admin/edit.php3.49 ▲0.1347.74 ▲2.45
Add New Post /wp-admin/post-new.php5.96 ▲0.0777.98 ▼15.77
Media Library /wp-admin/upload.php3.30 ▲0.0734.42 ▲1.27

Server storage [IO: ▲0.04MB] [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: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Ninjaforms Add-on
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲6713.26 ▼1.121.54 ▼0.0239.03 ▼2.02
Dashboard /wp-admin2,222 ▲315.90 ▲1.00108.92 ▲5.6143.09 ▼0.75
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0038.54 ▲0.7936.48 ▲2.63
Add New Post /wp-admin/post-new.php1,542 ▲2822.84 ▲5.47682.12 ▼23.2058.94 ▲4.33
Media Library /wp-admin/upload.php1,395 ▲44.23 ▲0.0097.07 ▼5.8140.64 ▼11.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-ninjaforms-add-on/resources/FieldForV4.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-ninjaforms-add-on/resources/Field.php:8

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 Passed 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
9 plugin tags: ninja form, advanced custom fields, forms, form, ninja forms...

acf-ninjaforms-add-on/acf-ninjaforms-add-on.php Passed 13 tests

This is the main PHP file of "Advanced Custom Fields: Ninjaforms Add-on" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
58 characters long description:
Advanced Custom Field with which we can select Ninjaforms.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin742 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160325697
PO File16645

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity12.57
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.72
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods36.25%
▷ Public methods4593.75%
▷ Protected methods00.00%
▷ Private methods36.25%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin