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

Code Review | Advanced Custom Fields - Code Area Field

WordPress plugin Advanced Custom Fields - Code Area Field scored84%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: 6.3.1
  • 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

10 reviews

Install metrics

600+ active /35,075 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.03ms] Passed 4 tests

An overview of server-side resources used by Advanced Custom Fields - Code Area Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.07 ▲1.32
Dashboard /wp-admin3.31 ▲0.0146.29 ▼7.44
Posts /wp-admin/edit.php3.36 ▲0.0043.21 ▼3.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0079.44 ▼2.25
Media Library /wp-admin/upload.php3.23 ▲0.0033.28 ▼15.12

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Advanced Custom Fields - Code Area Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.151.79 ▼0.1938.96 ▲1.06
Dashboard /wp-admin2,206 ▲144.86 ▼1.0898.55 ▼9.8539.12 ▼3.57
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0634.21 ▼5.9034.13 ▼1.85
Add New Post /wp-admin/post-new.php1,519 ▼523.01 ▼0.12666.77 ▲0.2054.78 ▼23.89
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0495.25 ▼3.7344.13 ▲0.24

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > 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
    • > 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-v4.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: advanced custom fields, acf, code

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

The entry point to "Advanced Custom Fields - Code Area Field" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Name the main plugin file the same as 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 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin7,554 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript76684816,436
CSS1912197734
PHP3149290384

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
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
No PNG images were found in this plugin