78% custom-post-type-ui

Code Review | Custom Post Type UI

WordPress plugin Custom Post Type UI scored78%from 54 tests.

About plugin

  • Plugin page: custom-post-type-ui
  • Plugin version: 1.15.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.3-6.4
  • WordPress version: 6.3.1
  • First release: Feb 26, 2010
  • Latest release: Nov 9, 2023
  • Number of updates: 189
  • Update frequency: every 26.5 days
  • Top authors: tw2113 (74.07%)williamsba1 (23.28%)webdevstudios (3.7%)

Code review

54 tests

User reviews

260 reviews

Install metrics

1,000,000+ active /16,327,460 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.14MB] [CPU: ▲5.56ms] Passed 4 tests

Server-side resources used by Custom Post Type UI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.63 ▲1.1643.12 ▲3.92
Dashboard /wp-admin4.47 ▲1.1655.11 ▲8.41
Posts /wp-admin/edit.php4.52 ▲1.1654.96 ▲5.60
Add New Post /wp-admin/post-new.php7.01 ▲1.1294.60 ▲4.29
Media Library /wp-admin/upload.php4.33 ▲1.1044.29 ▲8.45
Add/Edit Post Types /wp-admin/admin.php?page=cptui_manage_post_types4.3345.57
Help/Support /wp-admin/admin.php?page=cptui_support4.3045.46
Add/Edit Taxonomies /wp-admin/admin.php?page=cptui_manage_taxonomies4.3038.72
About CPT UI /wp-admin/admin.php?page=cptui_main_menu4.2940.70
Tools /wp-admin/admin.php?page=cptui_tools4.3039.12
Registered Types/Taxes /wp-admin/admin.php?page=cptui_listings4.3038.70

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 7 new options
New WordPress options
cptui_new_install
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Custom Post Type UI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7114.22 ▼0.131.59 ▼0.0838.71 ▼1.63
Dashboard /wp-admin2,238 ▲585.61 ▼0.0290.16 ▼2.6040.10 ▼3.51
Posts /wp-admin/edit.php2,146 ▲462.10 ▲0.1639.86 ▼0.8436.85 ▼2.22
Add New Post /wp-admin/post-new.php1,560 ▲3423.22 ▼0.38678.41 ▼29.0157.69 ▲4.50
Media Library /wp-admin/upload.php1,437 ▲374.27 ▲0.1397.78 ▼8.8442.55 ▼2.96
Add/Edit Post Types /wp-admin/admin.php?page=cptui_manage_post_types2,3553.5454.8043.94
Help/Support /wp-admin/admin.php?page=cptui_support1,7712.6067.1769.81
Add/Edit Taxonomies /wp-admin/admin.php?page=cptui_manage_taxonomies1,9432.2140.2748.17
About CPT UI /wp-admin/admin.php?page=cptui_main_menu8962.1423.1046.34
Tools /wp-admin/admin.php?page=cptui_tools9171.9924.0027.49
Registered Types/Taxes /wp-admin/admin.php?page=cptui_listings8372.0023.5627.84

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • cptui_new_install

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cptui_manage_post_types
    • > request to
    • > Notice in wp-config.php+20
    Undefined index: REQUEST_METHOD

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI_Command' not found in wp-content/plugins/custom-post-type-ui/inc/wp-cli.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: cpt, types, cms, post, custom post types...

custom-post-type-ui/custom-post-type-ui.php 92% from 13 tests

The principal PHP file in "Custom Post Type UI" v. 1.15.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin7,485 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP161,1092,4776,772
JavaScript410388
CSS2431325

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity30.50
▷ Minimum class complexity13.00
▷ Maximum class complexity55.00
Average method complexity3.68
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods4397.73%
▷ Protected methods00.00%
▷ Private methods12.27%
Functions126
▷ Named functions12599.21%
▷ Anonymous functions10.79%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wds_ads/cptui-extended.png6.72KB7.57KB0.00%
images/cptui-icon-173x173.png4.41KB1.84KB▼ 58.29%
images/wds_ads/buddypages.png4.40KB4.94KB0.00%
images/wds_ads/wp-search-with-algolia-pro.png26.78KB9.17KB▼ 65.75%
images/wds_ads/instago.png21.12KB22.41KB0.00%