89% acf-flexible-content-layout-thumbnail

Code Review | ACF Flexible Content Layout Thumbnail

WordPress plugin ACF Flexible Content Layout Thumbnail scored89%from 54 tests.

About plugin

  • Plugin page: acf-flexible-cont...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Jul 11, 2018
  • Number of updates: 5
  • Update frequency: every 2.8 days
  • Top authors: webcentar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /830 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▼0.19MB] [CPU: ▼19.04ms] Passed 4 tests

A check of server-side resources used by ACF Flexible Content Layout Thumbnail
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.42 ▲2.00
Dashboard /wp-admin3.24 ▼0.1034.72 ▼27.37
Posts /wp-admin/edit.php3.31 ▼0.0535.84 ▼13.97
Add New Post /wp-admin/post-new.php5.25 ▼0.6367.00 ▼31.36
Media Library /wp-admin/upload.php3.25 ▲0.0236.08 ▼3.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by ACF Flexible Content Layout Thumbnail
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.20 ▼1.182.01 ▲0.2737.20 ▼3.87
Dashboard /wp-admin2,222 ▲344.87 ▲0.00105.90 ▲4.3143.77 ▼3.71
Posts /wp-admin/edit.php2,105 ▲132.01 ▼0.1240.87 ▼0.6338.32 ▲2.80
Add New Post /wp-admin/post-new.php1,546 ▲2423.19 ▲0.01649.27 ▼29.7959.64 ▲1.95
Media Library /wp-admin/upload.php1,404 ▲164.22 ▲0.0299.14 ▼18.5149.11 ▲0.21

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: fields, field, acf, thumbnails, thumbnail...

acf-flexible-content-layout-thumbnail/acf-fcl.php 77% from 13 tests

This is the main PHP file of "ACF Flexible Content Layout Thumbnail" 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
The following require your attention:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Requires at least: Required version does not match the one declared in readme.txt ("4.8" instead of "1.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("acf-flexible-content-layout-thumbnail.php" instead of "acf-fcl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected433 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP693231433

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.93
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods28
▷ Static methods27.14%
▷ Public methods2485.71%
▷ Protected methods00.00%
▷ Private methods414.29%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
1 PNG file occupies 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/noImage.png37.09KB20.66KB▼ 44.30%