84% acf-timber-integration

Code Review | ACF Timber Integration

WordPress plugin ACF Timber Integration scored84%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: 6.3.1
  • 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

500+ active /5,181 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.96ms] Passed 4 tests

An overview of server-side resources used by ACF Timber Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0939.88 ▲0.64
Dashboard /wp-admin3.39 ▲0.0550.40 ▼6.22
Posts /wp-admin/edit.php3.50 ▲0.1551.26 ▲3.62
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.50 ▼6.57
Media Library /wp-admin/upload.php3.31 ▲0.0935.46 ▲0.32

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

ACF Timber Integration: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.29 ▼1.101.69 ▼0.1042.67 ▲2.49
Dashboard /wp-admin2,209 ▲244.84 ▼1.06102.26 ▼2.1138.00 ▼3.92
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0336.50 ▼0.9035.47 ▲5.42
Add New Post /wp-admin/post-new.php1,534 ▲1223.24 ▼0.28609.17 ▼48.3349.13 ▼2.28
Media Library /wp-admin/upload.php1,388 ▼34.18 ▼0.0595.33 ▼3.0240.31 ▼4.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

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
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
The following issues need your attention
  • 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 just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: acf, timber, twig, advanced custom fields, integration

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

Analyzing the main PHP file in "ACF Timber Integration" version 1.4.0
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 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected452 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3119239452

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin