84% mb-custom-post-type

Code Review | MB Custom Post Types & Custom Taxonomies

WordPress plugin MB Custom Post Types & Custom Taxonomies scored84%from 54 tests.

About plugin

  • Plugin page: mb-custom-post-type
  • Plugin version: 2.6.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4.1
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Nov 18, 2023
  • Number of updates: 128
  • Update frequency: every 23.1 days
  • Top authors: rilwis (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

10,000+ active /171,110 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.31MB] [CPU: ▲0.10ms] Passed 4 tests

Analyzing server-side resources used by MB Custom Post Types & Custom Taxonomies
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2341.12 ▲0.90
Dashboard /wp-admin3.70 ▲0.3555.17 ▼6.11
Posts /wp-admin/edit.php3.75 ▲0.4051.22 ▲5.38
Add New Post /wp-admin/post-new.php6.22 ▲0.3394.68 ▲3.41
Media Library /wp-admin/upload.php3.56 ▲0.3335.34 ▲2.21
Taxonomies /wp-admin/edit.php?post_type=mb-taxonomy3.6143.33
Post Types /wp-admin/edit.php?post_type=mb-post-type3.6140.34
New Post Type /wp-admin/post-new.php?post_type=mb-post-type3.6545.20

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

MB Custom Post Types & Custom Taxonomies: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7214.23 ▼0.021.71 ▲0.0338.03 ▼5.49
Dashboard /wp-admin2,233 ▲535.57 ▼0.1288.04 ▼5.4639.76 ▼6.13
Posts /wp-admin/edit.php2,141 ▲441.96 ▼0.0538.97 ▲0.9036.28 ▼0.93
Add New Post /wp-admin/post-new.php1,558 ▲3223.14 ▼0.16666.70 ▼1.4955.09 ▲3.80
Media Library /wp-admin/upload.php1,435 ▲324.24 ▲0.1098.79 ▲1.5144.33 ▲2.21
Taxonomies /wp-admin/edit.php?post_type=mb-taxonomy1,2196.20144.0030.02
Post Types /wp-admin/edit.php?post_type=mb-post-type1,2226.1861.3929.09
New Post Type /wp-admin/post-new.php?post_type=mb-post-type1,6278.83137.0639.41

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Please fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'MBCPT\\Register' not found in wp-content/plugins/mb-custom-post-type/src/TaxonomyRegister.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'MBCPT\\Register' not found in wp-content/plugins/mb-custom-post-type/src/PostTypeRegister.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: No descriptions were found for these screenshots #2, #3, #4, #5, #6 in mb-custom-post-type/assets to your readme.txt
Please take inspiration from this readme.txt

mb-custom-post-type/mb-custom-post-type.php Passed 13 tests

"MB Custom Post Types & Custom Taxonomies" version 2.6.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Create custom post types and custom taxonomies with easy-to-use UI

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
There were no executable files found in this plugin2,256 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP223214962,183
JavaScript415353
CSS20120

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity17.56
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes16
▷ Abstract classes16.25%
▷ Concrete classes1593.75%
▷ Final classes00.00%
Methods114
▷ Static methods3026.32%
▷ Public methods9381.58%
▷ Protected methods32.63%
▷ Private methods1815.79%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants3
▷ Global constants3100.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 files were detected