90% acf-snippets

Code Review | Advanced Custom Fields: Snippets

WordPress plugin Advanced Custom Fields: Snippets scored90%from 54 tests.

About plugin

  • Plugin page: acf-snippets
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2
  • WordPress version: 6.3.1
  • First release: Jun 8, 2019
  • Latest release: Jun 8, 2019
  • Number of updates: 8
  • Update frequency: every 0.9 days
  • Top authors: tomekthewo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼13.06ms] Passed 4 tests

A check of server-side resources used by Advanced Custom Fields: Snippets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.37 ▼1.87
Dashboard /wp-admin3.34 ▼0.0146.46 ▼18.74
Posts /wp-admin/edit.php3.39 ▲0.0347.08 ▼11.88
Add New Post /wp-admin/post-new.php5.92 ▲0.0392.82 ▼19.75
Media Library /wp-admin/upload.php3.26 ▲0.0339.80 ▲3.97

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Advanced Custom Fields: Snippets: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.72 ▲0.371.80 ▲0.1141.24 ▲1.91
Dashboard /wp-admin2,195 ▲155.52 ▼0.0185.37 ▼6.0939.22 ▼2.04
Posts /wp-admin/edit.php2,103 ▼02.02 ▲0.0339.31 ▼2.0836.09 ▼3.98
Add New Post /wp-admin/post-new.php1,529 ▼823.68 ▲5.71665.15 ▲47.0966.07 ▼0.46
Media Library /wp-admin/upload.php1,403 ▲34.25 ▲0.03102.29 ▼3.3745.06 ▼2.71

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: acf, advanced custom fields, snippets

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

The primary PHP file in "Advanced Custom Fields: Snippets" version 1.0.0 is used by WordPress to initiate all plugin functionality
137 characters long description:
Adds useful function for rendering image fields, link fields, repeater fields and flexible content for the Advanced Custom Fields plugin.

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
Good job! No executable or dangerous file extensions detected181 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP56112181

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin