89% migrate-post

Code Review | Migrate Posts

WordPress plugin Migrate Posts scored89%from 54 tests.

About plugin

  • Plugin page: migrate-post
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.1
  • WordPress version: 6.3.1
  • First release: Dec 13, 2018
  • Latest release: Jan 15, 2019
  • Number of updates: 7
  • Update frequency: every 4.7 days
  • Top authors: dswpsupport (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active /2,459 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.78ms] Passed 4 tests

This is a short check of server-side resources used by Migrate Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0645.13 ▲0.80
Dashboard /wp-admin3.36 ▲0.0647.01 ▼7.55
Posts /wp-admin/edit.php3.41 ▲0.0550.18 ▼3.55
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.37 ▼8.10
Media Library /wp-admin/upload.php3.28 ▲0.0541.36 ▲0.10
Add New /wp-admin/admin.php?page=add_new_domain3.2934.06
Migrate Post Domains /wp-admin/admin.php?page=mp_migratepost_domain3.2735.44

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: 1 new table, 6 new options
New tables
mp_migratepost_domains
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Migrate Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.27 ▼1.035.51 ▲3.6843.29 ▼0.09
Dashboard /wp-admin2,237 ▲494.88 ▼0.01108.50 ▲2.0745.05 ▲4.00
Posts /wp-admin/edit.php2,120 ▲312.05 ▲0.0534.97 ▲0.3333.44 ▼4.22
Add New Post /wp-admin/post-new.php1,541 ▲2723.23 ▲5.69679.62 ▼2.9952.87 ▲0.77
Media Library /wp-admin/upload.php1,422 ▲314.19 ▲0.06106.74 ▼9.1547.85 ▼4.26
Add New /wp-admin/admin.php?page=add_new_domain9502.0526.4839.39
Migrate Post Domains /wp-admin/admin.php?page=mp_migratepost_domain9131.8627.9727.73

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

migrate-post/migrate-posts.php 92% from 13 tests

This is the main PHP file of "Migrate Posts" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("migrate-post.php" instead of "migrate-posts.php")

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
Good job! No executable or dangerous file extensions detected722 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5212131605
JavaScript120367
CSS17050

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected