89% hide-cpt-category-from-url

Code Review | Hide CPT category from URL

WordPress plugin Hide CPT category from URL scored89%from 54 tests.

About plugin

  • Plugin page: hide-cpt-category...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.3-4.9
  • WordPress version: 6.3.1
  • First release: Jul 11, 2018
  • Latest release: Jul 11, 2018
  • Number of updates: 9
  • Update frequency: every 26.2 days
  • Top authors: shashank24 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /722 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.61ms] Passed 4 tests

A check of server-side resources used by Hide CPT category from URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.12 ▼2.65
Dashboard /wp-admin3.32 ▼0.0350.03 ▼12.59
Posts /wp-admin/edit.php3.37 ▲0.0150.32 ▲3.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.81 ▲0.02
Media Library /wp-admin/upload.php3.24 ▲0.0139.20 ▲0.77

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hide CPT category from URL
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲4014.72 ▲0.161.78 ▲0.2345.14 ▲5.97
Dashboard /wp-admin2,210 ▲335.64 ▲0.0485.69 ▼6.8638.20 ▼5.01
Posts /wp-admin/edit.php2,112 ▲151.99 ▼0.0238.39 ▼0.3933.90 ▼4.31
Add New Post /wp-admin/post-new.php1,536 ▲823.79 ▲0.57702.34 ▲31.4255.46 ▲1.56
Media Library /wp-admin/upload.php1,409 ▲64.38 ▲0.19112.25 ▲9.1647.18 ▲1.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 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)
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Select all custom post types you want to hide), #2 (Hidden custom post type slug from the URL)
Please take inspiration from this readme.txt

hide-cpt-category-from-url/hidecptcategoryfromurl.php 85% from 13 tests

The principal PHP file in "Hide CPT category from URL" v. 1.0.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Domain Path: The domain path folder was not found ("/languages")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("hide-cpt-category-from-url.php" instead of "hidecptcategoryfromurl.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected113 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2641113

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.53
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin