84% gutenberg-custom-fields

Code Review | Gutenberg Custom Fields

WordPress plugin Gutenberg Custom Fields scored84%from 54 tests.

About plugin

  • Plugin page: gutenberg-custom-...
  • Plugin version: 1.5.6
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.9.6
  • WordPress version: 6.3.1
  • First release: Dec 7, 2017
  • Latest release: Nov 23, 2018
  • Number of updates: 40
  • Update frequency: every 8.8 days
  • Top authors: youknowriad (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

80+ active /15,731 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.10MB] [CPU: ▼3.10ms] Passed 4 tests

Analyzing server-side resources used by Gutenberg Custom Fields
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1151.07 ▲9.70
Dashboard /wp-admin3.41 ▲0.1050.06 ▲0.20
Posts /wp-admin/edit.php3.46 ▲0.1054.17 ▼0.58
Add New Post /wp-admin/post-new.php6.05 ▲0.1790.77 ▼17.57
Media Library /wp-admin/upload.php3.33 ▲0.1043.10 ▲5.57

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Gutenberg Custom Fields
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.26 ▼1.421.87 ▲0.1343.02 ▼4.54
Dashboard /wp-admin2,219 ▲285.77 ▲0.89103.65 ▼1.7539.97 ▼4.14
Posts /wp-admin/edit.php2,102 ▲132.03 ▼0.0139.82 ▼2.9835.75 ▼1.12
Add New Post /wp-admin/post-new.php1,548 ▲2924.73 ▲1.61726.55 ▲107.5138.33 ▼15.72
Media Library /wp-admin/upload.php1,401 ▲194.24 ▲0.10100.87 ▲0.5850.20 ▼1.39

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 10× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/fields-script.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/hacks.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/gutenberg-custom-fields/lib/endpoint.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/hacks.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/i18n-script.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/gutenberg-custom-fields/languages/gcf-translations.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/config-app-page.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/config-app-script.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/register-templates.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gutenberg-custom-fields/lib/custom-post-type.php:33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: gutenberg

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

"Gutenberg Custom Fields" version 1.5.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
32 characters long description:
Custom Fields, The Gutenberg way

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
There were no executable files found in this plugin474 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP11105147463
CSS2006
JavaScript30175

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1593.75%
▷ Protected methods16.25%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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