84% custom-post-types

Code Review | Custom post types, Custom Fields & more

WordPress plugin Custom post types, Custom Fields & more scored84%from 54 tests.

About plugin

  • Plugin page: custom-post-types
  • Plugin version: 5.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 7, 2019
  • Latest release: Nov 6, 2023
  • Number of updates: 182
  • Update frequency: every 9.0 days
  • Top authors: andreadegiovine (98.35%)totalpressorg (1.65%)Otto42 (1.1%)

Code review

54 tests

User reviews

53 reviews

Install metrics

4,000+ active /101,049 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.21MB] [CPU: ▲12.19ms] Passed 4 tests

An overview of server-side resources used by Custom post types, Custom Fields & more
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.65 ▲1.1949.55 ▲3.10
Dashboard /wp-admin4.56 ▲1.2666.48 ▲15.26
Posts /wp-admin/edit.php4.59 ▲1.2463.74 ▲16.08
Add New Post /wp-admin/post-new.php7.09 ▲1.21107.69 ▲16.03
Media Library /wp-admin/upload.php4.46 ▲1.2349.75 ▲14.38
Tools & Infos /wp-admin/edit.php?post_type=manage_cpt&page=tools4.4650.06
Templates /wp-admin/edit.php?post_type=manage_cpt&page=manage_cpt_template4.4752.40
Field groups /wp-admin/edit.php?post_type=manage_cpt_field4.5454.62
Taxonomies /wp-admin/edit.php?post_type=manage_cpt_tax4.5454.39
Post types /wp-admin/edit.php?post_type=manage_cpt4.5453.77
Admin notices /wp-admin/edit.php?post_type=manage_cpt&page=manage_cpt_admin_notices4.4751.13
Admin pages /wp-admin/edit.php?post_type=manage_cpt&page=manage_cpt_admin_pages4.4750.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 64 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
custom_post_types_installation_time
custom_post_types_registered_cpt_ids
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
custom_post_types_version
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Custom post types, Custom Fields & more
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,262 ▲47523.99 ▲9.651.81 ▼0.2831.34 ▼11.96
Dashboard /wp-admin2,655 ▲47512.34 ▲6.71309.30 ▲218.4557.38 ▲17.79
Posts /wp-admin/edit.php2,758 ▲65813.57 ▲11.58128.38 ▲89.2745.88 ▲11.13
Add New Post /wp-admin/post-new.php1,815 ▲28623.40 ▲0.66540.09 ▼144.4926.65 ▼26.33
Media Library /wp-admin/upload.php1,542 ▲14210.17 ▲5.93161.82 ▲57.1949.16 ▲1.43
Tools & Infos /wp-admin/edit.php?post_type=manage_cpt&page=tools1,54913.23116.3236.13
Templates /wp-admin/edit.php?post_type=manage_cpt&page=manage_cpt_template1,48213.30101.7837.49
Field groups /wp-admin/edit.php?post_type=manage_cpt_field1,76013.46116.7239.85
Taxonomies /wp-admin/edit.php?post_type=manage_cpt_tax1,75513.59112.2238.02
Post types /wp-admin/edit.php?post_type=manage_cpt1,73812.15116.5343.63
Admin notices /wp-admin/edit.php?post_type=manage_cpt&page=manage_cpt_admin_notices1,47613.07107.8037.25
Admin pages /wp-admin/edit.php?post_type=manage_cpt&page=manage_cpt_admin_pages1,47913.13105.2937.33

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • custom_post_types_registered_cpt_ids
    • widget_theysaidso_widget
    • can_compress_scripts
    • custom_post_types_version
    • custom_post_types_installation_time
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-post-types/includes/compatibilities/v4.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/custom-post-types/includes/compatibilities/saswp.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: custom taxonomies, cpt, custom post types, custom templates, custom fields

custom-post-types/custom-post-types.php 92% from 13 tests

The primary PHP file in "Custom post types, Custom Fields & more" version 5.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected5,815 lines of code in 61 files:
LanguageFilesBlank linesComment linesLines of code
PHP575321,2205,674
SVG280135
CSS1003
JavaScript10143

PHP code Passed 2 tests

This is a short overview 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.51
Average class complexity15.49
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes39
▷ Abstract classes25.13%
▷ Concrete classes3794.87%
▷ Final classes1232.43%
Methods248
▷ Static methods12650.81%
▷ Public methods22691.13%
▷ Protected methods00.00%
▷ Private methods228.87%
Functions121
▷ Named functions2117.36%
▷ Anonymous functions10082.64%
Constants25
▷ Global constants1768.00%
▷ Class constants832.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png4.82KB2.46KB▼ 48.94%