78% remove-post-type-slug

Code Review | Remove Post Type Slug

WordPress plugin Remove Post Type Slug scored 78% from 54 tests.

About plugin

  • Plugin page: remove-post-type-...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 15, 2021
  • Latest release: Jun 17, 2023
  • Number of updates: 7
  • Update frequency: every 87.1 days
  • Top authors: akshay.shah5189 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 707 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.84ms] Passed 4 tests

A check of server-side resources used by Remove Post Type Slug
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.40 ▲0.73
Dashboard /wp-admin3.32 ▲0.0244.75 ▼2.88
Posts /wp-admin/edit.php3.37 ▲0.0247.58 ▲3.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0292.59 ▼0.75
Media Library /wp-admin/upload.php3.24 ▲0.0233.72 ▼0.44

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
remove_custom_post_type_slug

Browser metrics Passed 4 tests

Checking browser requirements for Remove Post Type Slug
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,812 ▲7713.57 ▼0.781.69 ▲0.1438.01 ▼10.02
Dashboard /wp-admin2,221 ▲354.84 ▼1.05106.23 ▲4.4740.27 ▼2.96
Posts /wp-admin/edit.php2,101 ▲122.01 ▲0.0040.03 ▲5.6636.34 ▲3.31
Add New Post /wp-admin/post-new.php1,543 ▲2923.02 ▲5.53650.10 ▼31.3250.46 ▼10.18
Media Library /wp-admin/upload.php1,403 ▲214.24 ▲0.0496.04 ▼6.5343.92 ▼0.83

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/remove-post-type-slug/public/partials/remove-post-type-slug-public-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Remove_Post_Type_Slug_Admin' not found in wp-content/plugins/remove-post-type-slug/admin/partials/remove-post-type-slug-admin-display.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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 your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === remove-post-type-slug === )
You can look at the official readme.txt

remove-post-type-slug/remove-post-type-slug.php Passed 13 tests

This is the main PHP file of "Remove Post Type Slug" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
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 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin316 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP12135527316

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods29
▷ Static methods26.90%
▷ Public methods2482.76%
▷ Protected methods00.00%
▷ Private methods517.24%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin