84% pitta-migration

Code Review | Pitta Migration

WordPress plugin Pitta Migration scored84%from 54 tests.

About plugin

  • Plugin page: pitta-migration
  • Plugin version: 0.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-4.3
  • WordPress version: 6.3.1
  • First release: Jul 26, 2015
  • Latest release: Aug 25, 2015
  • Number of updates: 6
  • Update frequency: every 12.8 days
  • Top authors: icc97 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,164 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.03ms] Passed 4 tests

A check of server-side resources used by Pitta Migration
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0344.24 ▲4.12
Dashboard /wp-admin3.34 ▲0.0346.22 ▼1.76
Posts /wp-admin/edit.php3.39 ▲0.0345.39 ▼1.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0382.77 ▼8.68
Media Library /wp-admin/upload.php3.27 ▲0.0437.50 ▲4.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Pitta Migration
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.19 ▼1.401.65 ▼0.1836.77 ▼7.78
Dashboard /wp-admin2,212 ▲275.85 ▲0.96107.71 ▲5.8940.28 ▼4.21
Posts /wp-admin/edit.php2,098 ▲62.01 ▲0.0240.19 ▲0.7833.97 ▼4.19
Add New Post /wp-admin/post-new.php1,542 ▲2823.18 ▲5.53691.41 ▲49.3550.48 ▼4.53
Media Library /wp-admin/upload.php1,397 ▲94.26 ▲0.08110.20 ▲9.6649.89 ▲6.52

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pitta-migration/pitta-migration.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pitta-migration/src/views/setup.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pitta-migration/src/views/success.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/pitta-migration/src/views/error.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Screenshots: Add an image for screenshot #1 (A successful migration message)
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === pitta-migration === )
You can look at the official readme.txt

pitta-migration/pitta-migration.php Passed 13 tests

"Pitta Migration" version 0.4.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
66 characters long description:
Migrate WordPress databases using WP_HOME and WP_SITEURL constants

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected143 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP534170143

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods850.00%
▷ Protected methods00.00%
▷ Private methods850.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png5.95KB4.56KB▼ 23.41%