83% post-type-url-changer

Code Review | Post Type URL Changer

WordPress plugin Post Type URL Changer scored 83% from 54 tests.

About plugin

  • Plugin page: post-type-url-cha...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.4
  • WordPress version: 6.3.1
  • First release: Feb 17, 2015
  • Latest release: Feb 17, 2015
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: burimshala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,036 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.18MB] [CPU: ▼9.79ms] Passed 4 tests

This is a short check of server-side resources used by Post Type URL Changer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.39 ▼6.29
Dashboard /wp-admin3.32 ▲0.0149.92 ▼1.21
Posts /wp-admin/edit.php3.37 ▲0.0142.08 ▼4.46
Add New Post /wp-admin/post-new.php5.15 ▼0.7467.52 ▼27.20
Media Library /wp-admin/upload.php3.24 ▲0.0138.73 ▲2.98
Post Type URL Changer /wp-admin/options-general.php?page=post_type_url_changer3.2029.39

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Post Type URL Changer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.17 ▼1.211.63 ▼0.0336.98 ▼3.37
Dashboard /wp-admin2,212 ▲205.85 ▲0.90104.36 ▲1.6142.78 ▼0.15
Posts /wp-admin/edit.php2,095 ▲62.03 ▲0.0233.58 ▼0.2234.23 ▲0.38
Add New Post /wp-admin/post-new.php1,542 ▲2218.08 ▼5.12635.70 ▼27.9455.58 ▼4.38
Media Library /wp-admin/upload.php1,397 ▲94.20 ▼0.0294.04 ▼16.4043.44 ▼6.10
Post Type URL Changer /wp-admin/options-general.php?page=post_type_url_changer8042.0523.9424.66

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • um_post_type_url_changer_post_types
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-type-url-changer/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-type-url-changer/metabox.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-type-url-changer/url_injector.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/post-type-url-changer/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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:
  • Plugin Name: You should set the name of your plugin on the first line ( === post-type-url-changer === )
You can take inspiration from this readme.txt

post-type-url-changer/index.php 85% from 13 tests

The main PHP script in "Post Type URL Changer" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("post-type-url-changer.php" instead of "index.php")

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
No dangerous file extensions were detected68 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP481757
Markdown1308
CSS1003

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
PNG images were not found in this plugin