83% np-tiwg

Code Review | NP Twig: Front End for Custom Field & ACF

WordPress plugin NP Twig: Front End for Custom Field & ACF scored83%from 54 tests.

About plugin

  • Plugin page: np-tiwg
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Apr 8, 2021
  • Latest release: Jun 4, 2021
  • Number of updates: 28
  • Update frequency: every 2.1 days
  • Top authors: miniindustry (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,003 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

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

This is a short check of server-side resources used by NP Twig: Front End for Custom Field & ACF
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.48 ▼0.69
Dashboard /wp-admin3.36 ▲0.0651.15 ▼0.72
Posts /wp-admin/edit.php3.41 ▲0.0650.98 ▼1.54
Add New Post /wp-admin/post-new.php5.95 ▲0.0689.74 ▼3.56
Media Library /wp-admin/upload.php3.29 ▲0.0635.66 ▼4.64

Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Just a few items left to fix
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/np-tiwg/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for NP Twig: Front End for Custom Field & ACF
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.33 ▼1.261.74 ▼0.5344.40 ▲0.21
Dashboard /wp-admin2,221 ▲155.80 ▲0.90103.71 ▲3.8638.42 ▼1.65
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0340.09 ▼0.4535.48 ▼2.29
Add New Post /wp-admin/post-new.php6,264 ▲4,73826.11 ▲8.49933.72 ▲191.7957.23 ▼1.63
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.02101.03 ▼6.2342.32 ▼1.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/np-tiwg/post-meta.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/np-tiwg/np-twig.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 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: fron end, timber, twig, template, display...

np-tiwg/index.php 85% from 13 tests

The main PHP script in "NP Twig: Front End for Custom Field & ACF" version 1.0.5 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("np-tiwg.php" instead of "index.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin522 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP466148401
Markdown1500121

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.60
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected