70% custom-post-type-manager

Code Review | Custom Post Type Manager

WordPress plugin Custom Post Type Manager scored70%from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.6
  • WordPress version: 6.3.1
  • First release: Sep 26, 2013
  • Latest release: Sep 26, 2013
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: ryo-nosuke (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,094 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.72ms] Passed 4 tests

Server-side resources used by Custom Post Type Manager
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0837.74 ▼4.99
Dashboard /wp-admin3.38 ▲0.0848.23 ▼4.86
Posts /wp-admin/edit.php3.44 ▲0.0847.47 ▼0.05
Add New Post /wp-admin/post-new.php5.97 ▲0.0884.46 ▼8.97
Media Library /wp-admin/upload.php3.31 ▲0.0837.49 ▲1.74

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 15 new files
Database: 1 new table, 8 new options
New tables
wp_custom_posts
New WordPress options
theysaidso_admin_options
cptm_version
widget_recent-posts
widget_recent-comments
cptm_db_version
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Post Type Manager
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▲0.001.68 ▼0.0542.63 ▼1.46
Dashboard /wp-admin2,211 ▲335.62 ▲0.0189.11 ▼25.2543.81 ▲0.16
Posts /wp-admin/edit.php2,119 ▲192.01 ▲0.0136.32 ▼0.1040.23 ▲2.74
Add New Post /wp-admin/post-new.php1,541 ▲1023.27 ▲0.12605.18 ▼64.8550.70 ▼20.46
Media Library /wp-admin/upload.php1,419 ▲194.22 ▲0.0398.33 ▲3.5743.37 ▼1.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'cptm_deactive' not found or invalid function name
  • Zombie tables were found after uninstall: 1 table
    • wp_custom_posts
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • wp_calendar_block_has_published_posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: post types, custom post type, custom post types

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

"Custom Post Type Manager" version 0.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected614 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP47734439
PO File17172175

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icons/address-book.png0.70KB0.78KB0.00%
icons/report.png0.48KB0.43KB▼ 11.56%
icons/sticky-notes.png0.57KB0.45KB▼ 20.78%
icons/calendar.png0.47KB0.42KB▼ 10.14%
icons/anchor.png0.68KB0.54KB▼ 20.32%