90% custom-fields-gutenberg

Code Review | Custom Fields for Gutenberg

WordPress plugin Custom Fields for Gutenberg scored90%from 54 tests.

About plugin

  • Plugin page: custom-fields-gut...
  • Plugin version: 2.3.8
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Mar 28, 2018
  • Latest release: Oct 20, 2023
  • Number of updates: 22
  • Update frequency: every 92.4 days
  • Top authors: specialk (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

2,000+ active /39,563 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.13MB] [CPU: ▼1.59ms] Passed 4 tests

Analyzing server-side resources used by Custom Fields for Gutenberg
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.06 ▲0.17
Dashboard /wp-admin3.46 ▲0.1647.11 ▼6.56
Posts /wp-admin/edit.php3.57 ▲0.2245.45 ▲0.49
Add New Post /wp-admin/post-new.php6.05 ▲0.1686.51 ▲1.96
Media Library /wp-admin/upload.php3.38 ▲0.1536.27 ▼0.46
Custom Fields Gutenberg /wp-admin/options-general.php?page=g7g-cfg3.3530.88

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Fields for Gutenberg
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.071.59 ▼0.1041.26 ▲3.03
Dashboard /wp-admin2,196 ▲195.77 ▲0.1983.76 ▼17.1437.49 ▼4.85
Posts /wp-admin/edit.php2,104 ▲42.03 ▲0.0333.97 ▼8.6436.77 ▲0.23
Add New Post /wp-admin/post-new.php6,270 ▲4,74425.76 ▲2.03960.79 ▲269.6462.15 ▲5.92
Media Library /wp-admin/upload.php1,404 ▲74.22 ▼0.0798.46 ▲0.5544.60 ▼0.97
Custom Fields Gutenberg /wp-admin/options-general.php?page=g7g-cfg9192.1438.4143.53

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests Passed 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 no errors were found, this is by no means an exhaustive test

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: box, gutenberg, custom fields, display, meta box...

custom-fields-gutenberg/custom-fields-gutenberg.php Passed 13 tests

"Custom Fields for Gutenberg" version 2.3.8's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Restores the Custom Field meta box for the Gutenberg Block Editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,339 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP745340602
CSS310249
JavaScript23217

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin