84% acf-accordion

Code Review | Advanced Custom Fields: Accordion Tab Field

WordPress plugin Advanced Custom Fields: Accordion Tab Field scored84%from 54 tests.

About plugin

  • Plugin page: acf-accordion
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.5
  • WordPress version: 6.3.1
  • First release: Apr 6, 2015
  • Latest release: Apr 17, 2016
  • Number of updates: 13
  • Update frequency: every 29.0 days
  • Top authors: bogdand (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /17,544 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼10.12ms] Passed 4 tests

Server-side resources used by Advanced Custom Fields: Accordion Tab Field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.30 ▼7.84
Dashboard /wp-admin3.31 ▲0.0144.67 ▼0.87
Posts /wp-admin/edit.php3.36 ▲0.0141.96 ▼12.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.75 ▼13.00
Media Library /wp-admin/upload.php3.23 ▲0.0033.42 ▼6.73

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Advanced Custom Fields: Accordion Tab Field
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.64 ▼0.741.65 ▼0.4939.86 ▼8.57
Dashboard /wp-admin2,209 ▲214.87 ▼0.0396.95 ▼8.8539.92 ▼2.91
Posts /wp-admin/edit.php2,086 ▼32.04 ▲0.0033.67 ▼4.9634.25 ▲1.66
Add New Post /wp-admin/post-new.php1,533 ▼123.35 ▲0.17679.49 ▼4.8055.22 ▲2.53
Media Library /wp-admin/upload.php1,391 ▲64.20 ▲0.0199.85 ▼2.3642.80 ▲1.14

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

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 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/acf-accordion/acf-accordion-v4.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/acf-accordion/acf-accordion-v5.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/acf-accordion/acf-accordion.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Donate link: Invalid URI found ("goo.gl/1w6rU0")
You can take inspiration from this readme.txt

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

The main PHP script in "Advanced Custom Fields: Accordion Tab Field" version 1.1.1 is automatically included on every request by WordPress
126 characters long description:
An accordion field that lets you group multiple fields under accordion tabs. This makes a long ACF form break down with style.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected1,790 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JSON1001,348
PHP399262210
CSS2249144
JavaScript1343159
PO File151229

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin