94% acf-code-snippets

Code Review | Advanced Custom Fields Code Snippets

WordPress plugin Advanced Custom Fields Code Snippets scored 94% from 54 tests.

About plugin

  • Plugin page: acf-code-snippets
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-5.2.1
  • WordPress version: 5.9.2
  • First release: Jul 1, 2019
  • Latest release: Jul 1, 2019
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: kenkeydev (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 883 total downloads


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
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼300.21ms] Passed 4 tests

This is a short check of server-side resources used by Advanced Custom Fields Code Snippets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0656.99 ▲5.94
Dashboard /wp-admin3.46 ▲0.0533.25 ▼4.16
Posts /wp-admin/edit.php3.69 ▲0.0533.74 ▼3.02
Add New Post /wp-admin/post-new.php6.93 ▼0.0394.05 ▼1,187.65
Media Library /wp-admin/upload.php3.34 ▲0.0423.38 ▼6.01

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

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

Browser metrics Passed 4 tests

Advanced Custom Fields Code Snippets: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,764 ▲2015.79 ▲0.165.72 ▼0.252.26 ▲0.03
Dashboard /wp-admin2,895 ▲376.15 ▼0.06114.23 ▼21.43154.13 ▼7.52
Posts /wp-admin/edit.php2,691 ▲33.23 ▼0.0163.05 ▼2.34142.88 ▼1.32
Add New Post /wp-admin/post-new.php1,661 ▼016.52 ▲0.25421.70 ▲13.20161.69 ▲11.64
Media Library /wp-admin/upload.php1,698 ▲35.51 ▲0.02148.35 ▲14.63182.33 ▼4.57

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/acf-code-snippets/acf_code_snippets.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found


Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: boomcdn, kennykey, famousui, acf, advanced custom fields

acf-code-snippets/acf_code_snippets.php 85% from 13 tests

The main PHP script in "Advanced Custom Fields Code Snippets" version 1.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("acf-code-snippets.php" instead of "acf_code_snippets.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin485 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants2100.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