89% custom-post-type-maker

Code Review | Custom Post Type Maker

WordPress plugin Custom Post Type Maker scored 89% from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.0
  • WordPress version: 6.3.1
  • First release: Feb 4, 2013
  • Latest release: Jul 11, 2022
  • Number of updates: 96
  • Update frequency: every 35.9 days
  • Top authors: jornbakhuys (65.63%)graffino (35.42%)

Code review

54 tests

User reviews

17 reviews

Install metrics

10,000+ active / 145,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼0.54ms] Passed 4 tests

A check of server-side resources used by Custom Post Type Maker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3342.05 ▼2.56
Dashboard /wp-admin3.62 ▲0.3250.35 ▲0.43
Posts /wp-admin/edit.php3.68 ▲0.3351.04 ▲3.46
Add New Post /wp-admin/post-new.php6.21 ▲0.3391.21 ▼1.95
Media Library /wp-admin/upload.php3.55 ▲0.3338.09 ▲1.94
Taxonomies /wp-admin/edit.php?post_type=cptm_tax3.6037.96
Post Types /wp-admin/edit.php?post_type=cptm3.6037.88

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Post Type Maker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲14613.37 ▼0.991.52 ▼0.3741.34 ▼11.14
Dashboard /wp-admin2,290 ▲995.90 ▲1.01110.58 ▼3.5138.12 ▼9.05
Posts /wp-admin/edit.php2,170 ▲812.00 ▼0.0139.80 ▲5.0834.75 ▼3.21
Add New Post /wp-admin/post-new.php1,604 ▲7123.41 ▲0.11601.94 ▼78.7149.18 ▼5.40
Media Library /wp-admin/upload.php1,469 ▲784.18 ▼0.0794.95 ▼6.5842.18 ▲0.56
Taxonomies /wp-admin/edit.php?post_type=cptm_tax1,1692.0336.6439.93
Post Types /wp-admin/edit.php?post_type=cptm1,1772.0139.4534.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 93% from 29 tests

readme.txt 94% 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:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
You can take inspiration from this readme.txt

custom-post-type-maker/class-cptm.php 92% from 13 tests

The primary PHP file in "Custom Post Type Maker" version 1.2.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("custom-post-type-maker.php" instead of "class-cptm.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,539 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP11431971,272
CSS23313146
Markdown260071
JavaScript210050

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity240.00
▷ Minimum class complexity240.00
▷ Maximum class complexity240.00
Average method complexity12.95
▷ Minimum method complexity1.00
▷ Maximum method complexity85.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin