94% acf-timber-integration

Code Review | ACF Timber Integration

WordPress plugin ACF Timber Integration scored 94% from 54 tests.

About plugin

  • Plugin page: acf-timber-integr...
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.6.1
  • WordPress version: 5.9.2
  • First release: Dec 19, 2017
  • Latest release: Feb 10, 2021
  • Number of updates: 7
  • Update frequency: every 164.7 days
  • Top authors: Dream Production (100%)

Code review

54 tests

User reviews

1 review

Install metrics

400+ active / 3,384 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼299.46ms] Passed 4 tests

Analyzing server-side resources used by ACF Timber Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0254.18 ▲4.01
Dashboard /wp-admin3.43 ▲0.0232.02 ▼2.55
Posts /wp-admin/edit.php3.65 ▲0.0136.31 ▼2.27
Add New Post /wp-admin/post-new.php6.89 ▼0.0890.64 ▼1,191.55
Media Library /wp-admin/upload.php3.30 ▲0.0122.61 ▼1.46

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Timber Integration
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲916.18 ▲0.155.81 ▼1.042.34 ▲0.14
Dashboard /wp-admin2,892 ▲346.16 ▲0.02117.69 ▼16.22157.33 ▼2.60
Posts /wp-admin/edit.php2,688 ▼33.24 ▲0.0062.99 ▲0.69135.27 ▼4.03
Add New Post /wp-admin/post-new.php1,758 ▲3917.25 ▼5.28413.31 ▼14.19159.04 ▲3.06
Media Library /wp-admin/upload.php1,698 ▼05.56 ▲0.05146.33 ▲2.35183.47 ▼4.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/acf-timber-integration/acf-timber-integration.php:678

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: acf, twig, integration, timber, advanced custom fields

acf-timber-integration/acf-timber-integration.php Passed 13 tests

This is the main PHP file of "ACF Timber Integration" version 1.4.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
98 characters long description:
Automatically enables in the Timber twig context variable all user-defined advanced custom fields.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected452 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3119239452

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity34.67
▷ Minimum class complexity5.00
▷ Maximum class complexity94.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1664.00%
▷ Protected methods520.00%
▷ Private methods416.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.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 are no PNG files in this plugin