84% remove-custom-post-type-slug-from-permalink

Code Review | Remove custom post type slug from URL

WordPress plugin Remove custom post type slug from URL scored84%from 54 tests.

About plugin

  • Plugin page: remove-custom-pos...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2023
  • Latest release: Feb 22, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: wpteamindianic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /587 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

This is a short check of server-side resources used by Remove custom post type slug from URL
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0247.35 ▼5.16
Dashboard /wp-admin3.33 ▲0.0350.02 ▼1.12
Posts /wp-admin/edit.php3.38 ▲0.0248.58 ▼5.59
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.85 ▼18.56
Media Library /wp-admin/upload.php3.25 ▲0.0242.06 ▲4.79

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Remove custom post type slug from URL
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲12713.63 ▼0.728.45 ▲6.6742.53 ▼0.73
Dashboard /wp-admin2,211 ▲345.62 ▲0.1095.22 ▲3.5143.16 ▲0.28
Posts /wp-admin/edit.php2,113 ▲132.02 ▲0.0435.43 ▼0.9533.99 ▼0.34
Add New Post /wp-admin/post-new.php1,542 ▲1623.22 ▲0.09679.52 ▼5.1451.54 ▼9.56
Media Library /wp-admin/upload.php1,419 ▲194.23 ▲0.0197.33 ▼9.9144.41 ▼1.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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 take a closer look at the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/remove-custom-post-type-slug-from-permalink/admin/partials/remove-custom-post-type-slug-from-permalink-admin-display.php
    • > /wp-content/plugins/remove-custom-post-type-slug-from-permalink/public/partials/remove-custom-post-type-slug-from-permalink-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% 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: The official readme.txt might help

remove-custom-post-type-slug-from-permalink/remove-custom-post-type-slug-from-permalink.php Passed 13 tests

The main file in "Remove custom post type slug from URL" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
60 characters long description:
Remove default post type and custom post type slug from URLs

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
There were no executable files found in this plugin275 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12131535269
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods31
▷ Static methods26.45%
▷ Public methods2683.87%
▷ Protected methods00.00%
▷ Private methods516.13%
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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin