84% custom-permalinks-for-custom-post-types

Code Review | Custom Permalinks for Custom Post Types

WordPress plugin Custom Permalinks for Custom Post Types scored84%from 54 tests.

About plugin

  • Plugin page: custom-permalinks...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.4
  • WordPress version: 6.3.1
  • First release: Jun 23, 2019
  • Latest release: Apr 13, 2020
  • Number of updates: 7
  • Update frequency: every 42.3 days
  • Top authors: cx4djv (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /3,790 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.92ms] Passed 4 tests

An overview of server-side resources used by Custom Permalinks for Custom Post Types
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1035.02 ▼6.93
Dashboard /wp-admin3.39 ▲0.0942.14 ▼5.21
Posts /wp-admin/edit.php3.44 ▲0.0946.25 ▼0.89
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.19 ▲4.67
Media Library /wp-admin/upload.php3.31 ▲0.0934.81 ▲1.35

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Custom Permalinks for Custom Post Types
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.191.88 ▼0.2441.15 ▼7.81
Dashboard /wp-admin2,206 ▲144.88 ▼0.08108.73 ▲3.0739.41 ▼7.55
Posts /wp-admin/edit.php2,089 ▼31.99 ▼0.0140.26 ▼4.4135.56 ▲0.18
Add New Post /wp-admin/post-new.php1,534 ▼023.39 ▲0.34600.91 ▼0.9252.25 ▲2.04
Media Library /wp-admin/upload.php1,388 ▼34.21 ▲0.0296.50 ▲0.6142.03 ▼5.35

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/custom-permalinks-for-custom-post-types/custom-permalinks-for-custom-post-types.php:447

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: custom permalinks, custom post type, permalink, primary term, remove slug

custom-permalinks-for-custom-post-types/custom-permalinks-for-custom-post-types.php Passed 13 tests

The main PHP script in "Custom Permalinks for Custom Post Types" version 1.0.1 is automatically included on every request by WordPress
65 characters long description:
Removes the slug and customizable permalinks of custom post types

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin396 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13123396

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity93.00
▷ Minimum class complexity93.00
▷ Maximum class complexity93.00
Average method complexity12.25
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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 are no PNG files in this plugin