78% manage-custom-post-types

Code Review | Manage Custom Post Types

WordPress plugin Manage Custom Post Types scored 78% from 54 tests.

About plugin

  • Plugin page: manage-custom-pos...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8.3
  • WordPress version: 6.3.1
  • First release: Jun 2, 2017
  • Latest release: Jan 11, 2022
  • Number of updates: 17
  • Update frequency: every 99.1 days
  • Top authors: kadiwala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 775 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼5.15ms] Passed 4 tests

An overview of server-side resources used by Manage Custom Post Types
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0736.97 ▼2.58
Dashboard /wp-admin3.37 ▲0.0745.55 ▼2.00
Posts /wp-admin/edit.php3.49 ▲0.1348.42 ▲1.30
Add New Post /wp-admin/post-new.php5.97 ▲0.0989.42 ▼17.32
Media Library /wp-admin/upload.php3.30 ▲0.0740.80 ▲4.00
Add New Post Types /wp-admin/admin.php?page=mcpt_add_new_post_types3.3229.74
Manage Post Types /wp-admin/admin.php?page=mcpt_manage_post_types3.3634.19

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Manage Custom Post Types
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20414.05 ▼0.354.94 ▲3.1837.29 ▼6.31
Dashboard /wp-admin2,240 ▲514.89 ▼0.05112.44 ▼1.2342.44 ▲3.69
Posts /wp-admin/edit.php2,120 ▲312.03 ▲0.0337.78 ▲3.7036.37 ▲3.69
Add New Post /wp-admin/post-new.php1,544 ▲1323.37 ▲5.23665.67 ▲50.5260.75 ▲4.17
Media Library /wp-admin/upload.php1,422 ▲374.16 ▼0.13113.22 ▲16.0150.04 ▲6.84
Add New Post Types /wp-admin/admin.php?page=mcpt_add_new_post_types9162.0429.3627.33
Manage Post Types /wp-admin/admin.php?page=mcpt_manage_post_types9091.7123.4426.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=mcpt_manage_post_types
    • > Notice in wp-content/plugins/manage-custom-post-types/admin/partials/manage-post-types.php+238
    Undefined variable: mcpt_temp_id
    • > GET request to /wp-admin/admin.php?page=mcpt_manage_post_types
    • > Notice in wp-content/plugins/manage-custom-post-types/admin/partials/manage-post-types.php+238
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=mcpt_manage_post_types
    • > Warning in wp-content/plugins/manage-custom-post-types/admin/partials/manage-post-types.php+260
    count(): Parameter must be an array or an object that implements Countable

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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/manage-custom-post-types/public/partials/manage-custom-post-types-public-display.php
    • > /wp-content/plugins/manage-custom-post-types/admin/partials/manage-custom-post-types-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 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
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2 in manage-custom-post-types/assets to your readme.txt
  • Plugin Name: You should set the name of your plugin on the first line ( === manage-custom-post-types === )
You can look at the official readme.txt

manage-custom-post-types/manage-custom-post-types.php Passed 13 tests

"Manage Custom Post Types" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

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 plugin780 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP14176548768
JavaScript245412
CSS2080

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity1.57
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.16
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods25
▷ Static methods28.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin