90% acf-archive

Code Review | Advanced Custom Fields: Archive Templates

WordPress plugin Advanced Custom Fields: Archive Templates scored 90% 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: 6.3.1
  • 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 / 10,308 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.81ms] 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.49 ▲0.0341.31 ▼3.71
Dashboard /wp-admin3.33 ▲0.0349.73 ▼2.86
Posts /wp-admin/edit.php3.38 ▲0.0351.81 ▲3.57
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.34 ▼1.67
Media Library /wp-admin/upload.php3.25 ▲0.0338.69 ▲0.99

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Advanced Custom Fields: Archive Templates
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲1613.61 ▲0.405.40 ▲3.1342.51 ▼0.98
Dashboard /wp-admin2,222 ▲135.84 ▲0.9799.42 ▼13.8439.26 ▼2.33
Posts /wp-admin/edit.php2,105 ▲161.99 ▼0.0336.17 ▲0.1234.95 ▲2.05
Add New Post /wp-admin/post-new.php1,539 ▲2518.37 ▲0.91597.15 ▼98.7454.47 ▼2.69
Media Library /wp-admin/upload.php1,404 ▲134.26 ▲0.0594.36 ▼11.8642.12 ▼37.89

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
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 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: A description for screenshot #2 is missing in acf-archive/assets to your readme.txt
You can look at the official readme.txt

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
Everything looks great! No dangerous files found in this plugin153 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14479153

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin