94% acf-ninjaforms-add-on

Code Review | Advanced Custom Fields: Ninjaforms Add-on

WordPress plugin Advanced Custom Fields: Ninjaforms Add-on scored 94% 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: 5.9.2
  • 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 / 8,491 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼294.76ms] Passed 4 tests

An overview of server-side resources used by Advanced Custom Fields: Ninjaforms Add-on
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.1456.09 ▲4.38
Dashboard /wp-admin3.49 ▲0.0832.63 ▼0.25
Posts /wp-admin/edit.php3.72 ▲0.0735.78 ▼2.67
Add New Post /wp-admin/post-new.php6.95 ▼0.02135.78 ▼1,177.45
Media Library /wp-admin/upload.php3.37 ▲0.0725.01 ▲1.33

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Fields: Ninjaforms Add-on: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲3015.57 ▼0.445.80 ▲0.122.22 ▼0.62
Dashboard /wp-admin2,915 ▲546.07 ▲0.00117.88 ▼14.53155.97 ▼5.61
Posts /wp-admin/edit.php2,709 ▲213.36 ▲0.0065.21 ▲3.26141.15 ▲3.10
Add New Post /wp-admin/post-new.php1,765 ▲10421.51 ▼0.25462.59 ▲4.80161.52 ▲3.20
Media Library /wp-admin/upload.php1,718 ▲205.49 ▼0.04158.57 ▲14.31201.97 ▲14.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-ninjaforms-add-on/resources/Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-ninjaforms-add-on/resources/FieldForV4.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: acf, ninja form, forms, fields, form...

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

The principal PHP file in "Advanced Custom Fields: Ninjaforms Add-on" v. 1.1 is loaded by WordPress automatically on each request
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 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected742 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP12160325697
PO File16645

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin