84% post-type-transfer

Code Review | Post Type Transfer

WordPress plugin Post Type Transfer scored 84% from 54 tests.

About plugin

  • Plugin page: post-type-transfer
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2018
  • Latest release: Jan 31, 2023
  • Number of updates: 19
  • Update frequency: every 95.4 days
  • Top authors: krishaweb (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

2,000+ active / 12,284 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.77ms] Passed 4 tests

An overview of server-side resources used by Post Type Transfer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.97 ▼3.61
Dashboard /wp-admin3.31 ▲0.0146.54 ▼2.72
Posts /wp-admin/edit.php3.44 ▲0.0848.40 ▲1.93
Add New Post /wp-admin/post-new.php5.89 ▲0.0195.21 ▼6.66
Media Library /wp-admin/upload.php3.23 ▲0.0135.57 ▲2.33

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Post Type Transfer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.061.84 ▲0.0945.67 ▼2.47
Dashboard /wp-admin2,203 ▲125.83 ▲0.9494.47 ▼9.5138.28 ▼3.45
Posts /wp-admin/edit.php2,137 ▲482.03 ▲0.0140.30 ▲6.1835.49 ▲3.26
Add New Post /wp-admin/post-new.php1,533 ▼023.31 ▲0.06642.13 ▼8.3154.64 ▲2.92
Media Library /wp-admin/upload.php1,391 ▼04.18 ▼0.0294.47 ▼2.4641.36 ▲0.56

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'Post_Type_Transfer' not found in wp-content/plugins/post-type-transfer/lib/block/class-ptt-guntenberg-metabox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Post_Type_Transfer' not found in wp-content/plugins/post-type-transfer/admin/class-quick-edit.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
Attributes that require attention: Please take inspiration from this readme.txt

post-type-transfer/post-type-transfer.php Passed 13 tests

"Post Type Transfer" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
83 characters long description:
This plugin will allow user to change post type to other public post types or page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin312 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP530126214
JavaScript3111765
CSS22533

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG files were detected