90% custom-post-type-rewrite

Code Review | Custom Post Type Rewrite

WordPress plugin Custom Post Type Rewrite scored90%from 54 tests.

About plugin

  • Plugin page: custom-post-type-...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.2.0
  • WordPress version: 6.3.1
  • First release: Jan 28, 2015
  • Latest release: Apr 13, 2023
  • Number of updates: 25
  • Update frequency: every 119.9 days
  • Top authors: thingsym (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /12,788 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.57ms] Passed 4 tests

This is a short check of server-side resources used by Custom Post Type Rewrite
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.71 ▲1.37
Dashboard /wp-admin3.31 ▲0.0151.51 ▼1.00
Posts /wp-admin/edit.php3.36 ▲0.0047.44 ▼5.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.97 ▼8.88
Media Library /wp-admin/upload.php3.23 ▲0.0039.95 ▲3.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Custom Post Type Rewrite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.031.66 ▼0.7143.86 ▼1.61
Dashboard /wp-admin2,198 ▲275.57 ▼0.0888.51 ▼11.7537.41 ▼8.73
Posts /wp-admin/edit.php2,100 ▼32.00 ▼0.0333.04 ▼4.0236.57 ▲2.08
Add New Post /wp-admin/post-new.php1,535 ▲924.74 ▲1.01694.47 ▲8.5567.38 ▼10.12
Media Library /wp-admin/upload.php1,403 ▲34.17 ▼0.0798.33 ▼19.4242.29 ▼6.10

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: permalinks, custom post type, permalink, permalink structure

custom-post-type-rewrite/custom-post-type-rewrite.php 92% from 13 tests

Analyzing the main PHP file in "Custom Post Type Rewrite" version 1.2.1
The following require your attention:
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin86 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2244486

PHP code Passed 2 tests

This is a short overview 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.42
Average class complexity17.00
▷ Minimum class complexity17.00
▷ Maximum class complexity17.00
Average method complexity6.33
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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 images were found in this plugin