100% acf-archive

Code Review | Advanced Custom Fields: Archive Templates

WordPress plugin Advanced Custom Fields: Archive Templates scored 100% from 54 tests.

About plugin

  • Plugin page: acf-archive
  • Plugin version: 1.0.6
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.4
  • WordPress version: 5.9.2
  • First release: Oct 25, 2018
  • Latest release: May 25, 2020
  • Number of updates: 20
  • Update frequency: every 28.9 days
  • Top authors: imarkimage (90%)yehudah (15%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active / 8,911 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by Advanced Custom Fields: Archive Templates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0454.60 ▲4.22
Dashboard /wp-admin3.44 ▲0.0334.32 ▼0.58
Posts /wp-admin/edit.php3.67 ▲0.0337.15 ▲0.45
Add New Post /wp-admin/post-new.php6.91 ▼0.0693.92 ▼1,178.95
Media Library /wp-admin/upload.php3.32 ▲0.0322.96 ▼1.30

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Advanced Custom Fields: Archive Templates
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,784 ▲3016.20 ▲0.106.07 ▼1.112.56 ▲0.00
Dashboard /wp-admin2,916 ▲626.16 ▼0.01120.48 ▼18.31160.49 ▲7.34
Posts /wp-admin/edit.php2,715 ▲273.25 ▲0.0167.73 ▲5.09141.63 ▲2.22
Add New Post /wp-admin/post-new.php1,676 ▲1516.60 ▼1.78431.99 ▲19.09156.70 ▼0.50
Media Library /wp-admin/upload.php1,716 ▲155.48 ▼0.02159.53 ▲12.16187.13 ▼1.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Please a description for screenshot #2 in acf-archive/assets to your readme.txt
The official readme.txt might help

acf-archive/acf-archive.php Passed 13 tests

Analyzing the main PHP file in "Advanced Custom Fields: Archive Templates" version 1.0.6
90 characters long description:
ACF Archives is a little plugin for helping you attach ACF fields to the archive template.

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 detected153 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14479153

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods15
▷ Static methods16.67%
▷ Public methods1066.67%
▷ Protected methods00.00%
▷ Private methods533.33%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin