94% advanced-custom-fields-code-area-field

Code Review | Advanced Custom Fields - Code Area Field

WordPress plugin Advanced Custom Fields - Code Area Field scored 94% from 54 tests.

About plugin

  • Plugin page: advanced-custom-f...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.9.2
  • First release: Jun 20, 2013
  • Latest release: Apr 23, 2014
  • Number of updates: 7
  • Update frequency: every 44.0 days
  • Top authors: taylor.mitchellstjoseph (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

800+ active / 10,126 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Advanced Custom Fields - Code Area Field
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0158.28 ▲3.32
Dashboard /wp-admin3.41 ▲0.0137.35 ▼2.23
Posts /wp-admin/edit.php3.65 ▲0.0148.78 ▲3.42
Add New Post /wp-admin/post-new.php6.88 ▼0.09114.94 ▼1,145.09
Media Library /wp-admin/upload.php3.30 ▲0.0025.90 ▼0.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advanced Custom Fields - Code Area Field: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲515.83 ▲0.095.63 ▼1.872.93 ▲0.23
Dashboard /wp-admin2,895 ▲346.17 ▲0.01123.97 ▼7.86157.93 ▼5.39
Posts /wp-admin/edit.php2,691 ▼33.23 ▼0.0173.06 ▲9.05163.91 ▲19.40
Add New Post /wp-admin/post-new.php1,711 ▼4120.96 ▼0.11417.70 ▼92.26157.84 ▼12.89
Media Library /wp-admin/upload.php1,701 ▲65.53 ▲0.07152.26 ▲10.18190.71 ▲7.18

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/advanced-custom-fields-code-area-field/acf_code_area-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/advanced-custom-fields-code-area-field/acf-code_area.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'acf_Field' not found in wp-content/plugins/advanced-custom-fields-code-area-field/acf_code_area-v3.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

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

advanced-custom-fields-code-area-field/acf-code_area.php 92% from 13 tests

The primary PHP file in "Advanced Custom Fields - Code Area Field" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("advanced-custom-fields-code-area-field.php" instead of "acf-code_area.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
No dangerous file extensions were detected7,554 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript76684816,436
CSS1912197734
PHP3149290384

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity7.33
▷ Minimum class complexity2.00
▷ Maximum class complexity11.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin