90% acf-theme-code

Code Review | ACF Theme Code for Advanced Custom Fields

WordPress plugin ACF Theme Code for Advanced Custom Fields scored90%from 54 tests.

About plugin

  • Plugin page: acf-theme-code
  • Plugin version: 2.5.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 21, 2016
  • Latest release: Nov 28, 2023
  • Number of updates: 35
  • Update frequency: every 76.8 days
  • Top authors: aaronrutley (65.71%)benpearson (37.14%)

Code review

54 tests

User reviews

41 reviews

Install metrics

10,000+ active /129,659 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.14ms] Passed 4 tests

Analyzing server-side resources used by ACF Theme Code for Advanced Custom Fields
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0039.50 ▼1.45
Dashboard /wp-admin3.42 ▲0.0751.22 ▼12.52
Posts /wp-admin/edit.php3.53 ▲0.1747.93 ▼2.11
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.64 ▼4.48
Media Library /wp-admin/upload.php3.34 ▲0.1136.58 ▲1.79

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by ACF Theme Code for Advanced Custom Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5314.70 ▼0.001.95 ▲0.2441.94 ▼3.18
Dashboard /wp-admin2,192 ▲115.59 ▼0.1395.09 ▼16.9942.68 ▼3.03
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0039.09 ▼3.2635.53 ▼3.57
Add New Post /wp-admin/post-new.php1,526 ▼223.51 ▲0.54663.59 ▲25.3951.68 ▼0.62
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.1399.00 ▲0.1040.95 ▼7.28

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: advanced custom fields, php, automation, acf

acf-theme-code/acf_theme_code.php 92% from 13 tests

The main PHP script in "ACF Theme Code for Advanced Custom Fields" version 2.5.6 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-theme-code.php" instead of "acf_theme_code.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,917 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
PHP245254601,119
CSS315882690
JavaScript3443887
SVG30121

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity13.67
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods48
▷ Static methods36.25%
▷ Public methods2041.67%
▷ Protected methods510.42%
▷ Private methods2347.92%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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