84% move-postpage-to-subsite

Code Review | Move Post/Page to Subsite

WordPress plugin Move Post/Page to Subsite scored 84% from 54 tests.

About plugin

  • Plugin page: move-postpage-to-...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.2-3.6
  • WordPress version: 6.3.1
  • First release: Sep 13, 2013
  • Latest release: Sep 13, 2013
  • Number of updates: 7
  • Update frequency: every 0.7 days
  • Top authors: palermomarco (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,394 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲6.25ms] Passed 4 tests

A check of server-side resources used by Move Post/Page to Subsite
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.96 ▼0.20
Dashboard /wp-admin3.32 ▲0.0252.45 ▲6.77
Posts /wp-admin/edit.php3.37 ▲0.0251.51 ▲8.10
Add New Post /wp-admin/post-new.php5.90 ▲0.02102.10 ▲11.48
Media Library /wp-admin/upload.php3.24 ▲0.0241.36 ▲10.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Move Post/Page to Subsite
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.29 ▼0.921.73 ▲0.0341.14 ▲1.87
Dashboard /wp-admin2,209 ▲185.88 ▼0.0297.84 ▼21.2444.36 ▼0.64
Posts /wp-admin/edit.php2,086 ▼62.00 ▲0.0039.88 ▲5.3036.23 ▲6.08
Add New Post /wp-admin/post-new.php1,514 ▼1417.58 ▼0.91668.70 ▲29.1464.94 ▼2.44
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0599.65 ▲5.1145.55 ▲5.22

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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • 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
Good news, no errors were detected

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 items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/move-postpage-to-subsite/move-to-subsite.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/move-postpage-to-subsite/views/admin.php:65

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% 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
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (The admin page for moving to a subsite.)
You can look at the official readme.txt

move-postpage-to-subsite/move-to-subsite.php 92% from 13 tests

"Move Post/Page to Subsite" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("move-postpage-to-subsite.php" instead of "move-to-subsite.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected438 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP37636410
Markdown127028

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity19.50
▷ Minimum class complexity11.00
▷ Maximum class complexity28.00
Average method complexity2.61
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods2086.96%
▷ Public methods939.13%
▷ Protected methods1460.87%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants00.00%
▷ Class constants3100.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png72.90KB26.45KB▼ 63.71%