83% wck-custom-fields-and-custom-post-types-creator

Code Review | Custom Post Types and Custom Fields creator - WCK

WordPress plugin Custom Post Types and Custom Fields creator - WCK scored 83% from 54 tests.

About plugin

Code review

54 tests

User reviews

97 reviews

Install metrics

20,000+ active / 506,380 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.23MB] [CPU: ▲2.32ms] Passed 4 tests

Analyzing server-side resources used by Custom Post Types and Custom Fields creator - WCK
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.61 ▲1.1444.05 ▼8.68
Dashboard /wp-admin4.58 ▲1.2758.88 ▲9.39
Posts /wp-admin/edit.php4.60 ▲1.2461.56 ▲13.18
Add New Post /wp-admin/post-new.php7.21 ▲1.3297.45 ▼3.07
Media Library /wp-admin/upload.php4.50 ▲1.2746.59 ▲11.63
Custom Fields Creator /wp-admin/edit.php?post_type=wck-meta-box4.5447.08
Post Type Creator /wp-admin/admin.php?page=cptc-page4.5851.39
Swift Templates /wp-admin/admin.php?page=free-to-pro-stp4.5041.04
Front End Posting /wp-admin/admin.php?page=free-to-pro-fep4.5041.72
Start and Settings /wp-admin/admin.php?page=sas-page4.5364.25
Taxonomy Creator /wp-admin/admin.php?page=ctc-page4.5749.84
WCK Unserialized /wp-admin/admin.php?page=wck-unserialized4.4640.00

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 418 new files
Database: no new tables, 8 new options
New WordPress options
wck_meta_boxes_ids
can_compress_scripts
widget_recent-posts
wck_update_to_unserialized
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Custom Post Types and Custom Fields creator - WCK
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9914.74 ▲0.361.64 ▼0.3839.88 ▲3.39
Dashboard /wp-admin2,254 ▲695.80 ▲0.89108.41 ▼3.8180.67 ▲31.80
Posts /wp-admin/edit.php2,137 ▲482.01 ▼0.0237.24 ▼1.6833.59 ▼2.67
Add New Post /wp-admin/post-new.php1,595 ▲7219.16 ▼3.92771.12 ▲129.3939.77 ▼11.97
Media Library /wp-admin/upload.php1,433 ▲454.24 ▲0.0997.09 ▼11.1777.10 ▲33.58
Custom Fields Creator /wp-admin/edit.php?post_type=wck-meta-box1,1861.9836.9145.54
Post Type Creator /wp-admin/admin.php?page=cptc-page1,9945.1993.5283.31
Swift Templates /wp-admin/admin.php?page=free-to-pro-stp1,0052.0935.7258.02
Front End Posting /wp-admin/admin.php?page=free-to-pro-fep1,0302.1238.8446.45
Start and Settings /wp-admin/admin.php?page=sas-page1,3925.1689.4498.71
Taxonomy Creator /wp-admin/admin.php?page=ctc-page1,8525.2067.9089.94
WCK Unserialized /wp-admin/admin.php?page=wck-unserialized1,4992.3625.7428.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • wck_meta_boxes_ids
    • widget_theysaidso_widget
    • wck_update_to_unserialized
    • widget_recent-posts
    • db_upgraded
    • 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)
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 26× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/heading.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wck-template-api/wck-field-preprocess.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/languages/wck.catalog.php:1
    • > PHP Notice
      Undefined variable: element in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/timepicker.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wck-ctc.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/map.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/colorpicker.php:8
    • > PHP Notice
      Undefined variable: details in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/upload.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/select.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wck-custom-fields-and-custom-post-types-creator/wordpress-creation-kit-api/fields/phone.php:8

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)
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Creating custom post types and taxonomies), #2 (Creating custom fields and meta boxes), #3 (Custom Fields Creator - list of Meta boxes), #4 (Meta box with custom fields), #5 (Defined custom fields), #6 (Custom Fields Creator - Meta box arguments), #7 (Post Type Creator UI), #8 (Post Type Creator UI and listing), #9 (Taxonomy Creator UI), #10 (Taxonomy listing)
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
You can take inspiration from this readme.txt

wck-custom-fields-and-custom-post-types-creator/wck.php 77% from 13 tests

The main file in "Custom Post Types and Custom Fields creator - WCK" v. 2.3.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: The principal plugin file should be the same as the plugin slug ("wck-custom-fields-and-custom-post-types-creator.php" instead of "wck.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 203 characters long)

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
There were no executable files found in this plugin13,165 lines of code in 353 files:
LanguageFilesBlank linesComment linesLines of code
PHP321,1939935,287
JavaScript2862801,0663,729
Markdown977102,980
CSS24175781,076
HTML217893

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity67.67
▷ Minimum class complexity8.00
▷ Maximum class complexity338.00
Average method complexity6.88
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods68
▷ Static methods1116.18%
▷ Public methods6697.06%
▷ Protected methods11.47%
▷ Private methods11.47%
Functions140
▷ Named functions13495.71%
▷ Anonymous functions64.29%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
47 PNG files occupy 1.59MB with 0.46MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wck-logo-hobbyist.png56.29KB35.18KB▼ 37.50%
wordpress-creation-kit-api/assets/js/ckeditor/plugins/magicline/images/icon-rtl.png0.13KB0.14KB0.00%
wordpress-creation-kit-api/assets/js/ckeditor/skins/moono-lisa/images/lock-open.png0.50KB0.19KB▼ 62.82%
images/wck-32x32.png1.74KB1.66KB▼ 4.76%
wordpress-creation-kit-api/assets/js/ckeditor/plugins/wsc/icons/hidpi/spellchecker.png2.75KB1.63KB▼ 40.77%