74% hide-acf-layout

Code Review | Hide ACf Layout

WordPress plugin Hide ACf Layout scored 74% from 54 tests.

About plugin

  • Plugin page: hide-acf-layout
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0
  • WordPress version: 6.3.1
  • First release: Jul 28, 2022
  • Latest release: Jul 29, 2022
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: lukeketchen (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 294 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼1.73MB] [CPU: ▼47.39ms] Passed 4 tests

An overview of server-side resources used by Hide ACf Layout
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.199.02 ▼30.54
Dashboard /wp-admin2.28 ▼1.0312.61 ▼39.36
Posts /wp-admin/edit.php2.28 ▼1.088.87 ▼42.44
Add New Post /wp-admin/post-new.php2.28 ▼3.619.90 ▼77.20
Media Library /wp-admin/upload.php2.28 ▼0.9511.26 ▼22.51
Hide ACF Layout /wp-admin/tools.php?page=dropdown-option-setting2.2810.41

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Hide ACf Layout
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲4713.20 ▼1.255.37 ▲3.5646.86 ▼5.55
Dashboard /wp-admin2,211 ▲54.88 ▼0.15128.05 ▲20.7747.12 ▲3.03
Posts /wp-admin/edit.php2,103 ▲141.99 ▲0.0139.11 ▲4.7034.62 ▼0.17
Add New Post /wp-admin/post-new.php1,526 ▼823.06 ▼0.21685.42 ▼18.3482.71 ▲21.16
Media Library /wp-admin/upload.php1,393 ▲54.22 ▲0.04109.51 ▲2.0642.41 ▼11.70
Hide ACF Layout /wp-admin/tools.php?page=dropdown-option-setting8252.0530.9029.78

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
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'ACF_Hide_Layout' does not have a method 'init'
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=dropdown-option-setting
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'ACF_Hide_Layout' does not have a method 'init'
    • > GET request to /wp-admin/tools.php?page=dropdown-option-setting
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'ACF_Hide_Layout' does not have a method 'hide_acf_setting_add_plugin_page'

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed: You can take inspiration from this readme.txt

hide-acf-layout/hide-acf-layout.php Passed 13 tests

The primary PHP file in "Hide ACf Layout" version 1.0 is used by WordPress to initiate all plugin functionality
87 characters long description:
Hide a module in ACF flexible content on the frontend but still keep it in the backend.

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
No dangerous file extensions were detected412 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP16268188
PO File3182496
JavaScript110154
Markdown134052
CSS15022

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods00.00%
▷ Private methods14.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/icon.png23.68KB9.26KB▼ 60.87%