73% simple-content-construction-kit

Code Review | Simple Custom post type custom field

WordPress plugin Simple Custom post type custom field scored73%from 54 tests.

About plugin

  • Plugin page: simple-content-co...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.3.2
  • WordPress version: 6.3.1
  • First release: Mar 8, 2013
  • Latest release: Feb 26, 2020
  • Number of updates: 27
  • Update frequency: every 94.3 days
  • Top authors: faaiq (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /10,510 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.38MB] [CPU: ▼9.84ms] Passed 4 tests

Server-side resources used by Simple Custom post type custom field
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5544.52 ▼1.37
Dashboard /wp-admin3.71 ▲0.4134.99 ▼13.80
Posts /wp-admin/edit.php3.96 ▲0.6056.49 ▲2.63
Add New Post /wp-admin/post-new.php5.97 ▲0.0981.07 ▼23.95
Media Library /wp-admin/upload.php3.71 ▲0.4935.08 ▼0.24

Server storage [IO: ▲0.32MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 27 new files
Database: 7 new tables, 6 new options
New tables
wp_scck_content_type_fields_detail
wp_scck_content_type_fields
wp_scck_menu
wp_scck_content_type
wp_scck_content_type_fields_detail_tx
wp_scck_content_type_fields_group_rel
wp_scck_content_type_fields_group
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Custom post type custom field
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9714.39 ▲0.021.63 ▼0.3939.72 ▼5.66
Dashboard /wp-admin2,251 ▲636.17 ▲0.30149.82 ▲44.9383.32 ▲35.89
Posts /wp-admin/edit.php2,138 ▲493.02 ▲0.9753.13 ▲11.9336.53 ▲1.27
Add New Post /wp-admin/post-new.php6,550 ▲5,01726.69 ▲3.55967.42 ▲346.6336.46 ▼17.43
Media Library /wp-admin/upload.php1,424 ▲365.42 ▲1.20116.70 ▲19.0178.74 ▲35.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables were found after uninstall: 7 tables
    • wp_scck_content_type_fields_detail
    • wp_scck_content_type_fields_group
    • wp_scck_menu
    • wp_scck_content_type_fields_group_rel
    • wp_scck_content_type_fields
    • wp_scck_content_type
    • wp_scck_content_type_fields_detail_tx
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'simple_cck_fields' not found in wp-content/plugins/simple-content-construction-kit/wp-simple-cck-content.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/simple-content-construction-kit/wp-simple-cck.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'wp_simple_cck_build' not found in wp-content/plugins/simple-content-construction-kit/wp-simple-cck-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'simple_cck_fields_settings' not found in wp-content/plugins/simple-content-construction-kit/wp-simple-cck-fields.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === simple-content-construction-kit === )
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
The official readme.txt is a good inspiration

simple-content-construction-kit/wp-simple-cck.php 92% from 13 tests

The entry point to "Simple Custom post type custom field" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-content-construction-kit.php" instead of "wp-simple-cck.php")

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 detected4,460 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP6482662,893
CSS384741,567

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity45.33
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods97
▷ Static methods00.00%
▷ Public methods97100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
17 PNG files occupy 0.14MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
theme/dark-hive/images/ui-bg_glass_40_ffc73d_1x400.png0.16KB0.16KB▼ 1.80%
screenshot-2.png72.26KB27.54KB▼ 61.89%
theme/dark-hive/images/ui-bg_highlight-hard_20_0972a5_1x100.png0.15KB0.15KB0.00%
theme/dark-hive/images/ui-bg_flat_30_cccccc_40x100.png0.18KB0.08KB▼ 51.67%
theme/dark-hive/images/ui-bg_highlight-soft_35_222222_1x100.png0.11KB0.18KB0.00%