83% acf-flexible-content-layout-previews

Code Review | ACF Flexible Content Layout Previews

WordPress plugin ACF Flexible Content Layout Previews scored83%from 54 tests.

About plugin

  • Plugin page: acf-flexible-cont...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 1, 2019
  • Latest release: Jul 1, 2019
  • Number of updates: 5
  • Update frequency: every 0.6 days
  • Top authors: robertark (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /793 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼8.81ms] Passed 4 tests

This is a short check of server-side resources used by ACF Flexible Content Layout Previews
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.96 ▲0.65
Dashboard /wp-admin3.35 ▲0.0150.78 ▼12.86
Posts /wp-admin/edit.php3.47 ▲0.1150.45 ▲1.43
Add New Post /wp-admin/post-new.php5.96 ▲0.0787.00 ▼24.46
Media Library /wp-admin/upload.php3.28 ▲0.0537.95 ▲3.27

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ACF Flexible Content Layout Previews
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲4514.76 ▲0.371.78 ▼0.0146.63 ▲7.67
Dashboard /wp-admin2,209 ▲385.76 ▲0.0996.12 ▲1.8038.10 ▼2.34
Posts /wp-admin/edit.php2,120 ▲202.21 ▲0.2442.94 ▲4.2934.77 ▼3.99
Add New Post /wp-admin/post-new.php1,547 ▲1918.51 ▼4.42673.30 ▼53.2071.51 ▲15.69
Media Library /wp-admin/upload.php1,420 ▲264.23 ▲0.07107.67 ▲4.3542.35 ▼0.06

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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 items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/acf-flexible-content-layout-previews/admin/partials/acf-fc-layout-previews-admin-display.php

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 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === acf-flexible-content-layout-previews === )
  • Screenshots: These screenshots require images: #1 (When adding a new layout to your page, you are prompted with visual examples of each content row), #2 (You must name screenshots after the "Name" of the layout, in jpg format), #3 (Once you have screenshots ready to use, you must upload them to your [uploads]/acf-fc-layouts folder. This method may change in a major release in the future.)
You can look at the official readme.txt

acf-flexible-content-layout-previews/acf-fc-layout-previews.php 85% from 13 tests

This is the main PHP file of "ACF Flexible Content Layout Previews" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("acf-flexible-content-layout-previews.php" instead of "acf-fc-layout-previews.php")

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 detected262 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118539184
CSS15040
JavaScript1112238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.86
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.10
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.36MB with 0.21MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png58.40KB15.56KB▼ 73.37%
screenshot-1.png273.02KB109.84KB▼ 59.77%
screenshot-2.png35.60KB19.86KB▼ 44.21%