68% acf-beautiful-flexible

Code Review | ACF Beautiful Flexible

WordPress plugin ACF Beautiful Flexible scored68%from 54 tests.

About plugin

  • Plugin page: acf-beautiful-fle...
  • Plugin version: 1.0.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: May 8, 2022
  • Latest release: Sep 2, 2022
  • Number of updates: 12
  • Update frequency: every 10.2 days
  • Top authors: MaximeCulea (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /476 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.84MB] [CPU: ▼50.48ms] Passed 4 tests

An overview of server-side resources used by ACF Beautiful Flexible
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.346.62 ▼31.69
Dashboard /wp-admin2.17 ▼1.138.88 ▼40.35
Posts /wp-admin/edit.php2.17 ▼1.188.68 ▼42.44
Add New Post /wp-admin/post-new.php2.17 ▼3.719.90 ▼87.44
Media Library /wp-admin/upload.php2.17 ▼1.058.34 ▼28.07

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Beautiful Flexible
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲6614.44 ▲0.051.78 ▼0.0243.61 ▲3.40
Dashboard /wp-admin2,218 ▲305.99 ▲1.11114.01 ▲7.1543.92 ▼2.77
Posts /wp-admin/edit.php2,100 ▲81.98 ▼0.0237.05 ▼6.1034.45 ▼2.52
Add New Post /wp-admin/post-new.php1,540 ▲723.16 ▲0.10683.36 ▲7.1164.78 ▲6.76
Media Library /wp-admin/upload.php1,400 ▲154.21 ▼0.0397.79 ▼9.4544.77 ▼1.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > User notice in wp-content/plugins/acf-beautiful-flexible/classes/requirements.php+30
    Advanced Custom Fields is a required plugin.
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/acf-beautiful-flexible/acf-beautiful-flexible.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Trait 'ACF_Beautiful_Flexible\\Singleton' not found in wp-content/plugins/acf-beautiful-flexible/classes/main.php on line 3
    • > PHP Warning
      Use of undefined constant ACF_BEAUTIFUL_FLEXIBLE_DIR - assumed 'ACF_BEAUTIFUL_FLEXIBLE_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/acf-beautiful-flexible/autoload.php on line 196
    • > PHP Fatal error
      Trait 'ACF_Beautiful_Flexible\\Singleton' not found in wp-content/plugins/acf-beautiful-flexible/classes/requirements.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: fields, flexible, acf, acf addon, advanced custom fields

acf-beautiful-flexible/acf-beautiful-flexible.php Passed 13 tests

The principal PHP file in "ACF Beautiful Flexible" v. 1.0.5 is loaded by WordPress automatically on each request
61 characters long description:
Transform ACF's flexible layouts list into a beautiful popup.

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 detected462 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP692278238
CSS2160121
JavaScript42666
Markdown217037

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.40
▷ Minimum class complexity2.00
▷ Maximum class complexity19.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits1
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods313.04%
▷ Public methods1773.91%
▷ Protected methods417.39%
▷ Private methods28.70%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants5
▷ Global constants5100.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
There are no PNG files in this plugin