83% hiweb-migration-simple

Code Review | hiWeb Migration Simple

WordPress plugin hiWeb Migration Simple scored83%from 54 tests.

About plugin

  • Plugin page: hiweb-migration-s...
  • Plugin version: 2.0.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2016
  • Latest release: Nov 21, 2018
  • Number of updates: 18
  • Update frequency: every 52.6 days
  • Top authors: Den Media (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

20+ active /1,836 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
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by hiWeb Migration Simple
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.51 ▼4.57
Dashboard /wp-admin3.31 ▲0.0144.89 ▼5.69
Posts /wp-admin/edit.php3.36 ▲0.0145.24 ▼8.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0178.77 ▼22.07
Media Library /wp-admin/upload.php3.24 ▲0.0136.40 ▲4.01
hiWeb Migration S /wp-admin/tools.php?page=hw_migration_simple5.8871.48

Server storage [IO: ▲0.40MB] [DB: ▲0.07MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
db_upgraded
hw_migration_simple_baseurl
widget_theysaidso_widget
hw_migration_simple_basedir

Browser metrics Passed 4 tests

A check of browser resources used by hiWeb Migration Simple
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4713.58 ▼0.791.68 ▼0.6437.48 ▼9.15
Dashboard /wp-admin2,210 ▲224.85 ▼1.01108.17 ▲10.4338.17 ▼2.38
Posts /wp-admin/edit.php2,096 ▲41.97 ▼0.0439.90 ▼2.2733.91 ▼2.89
Add New Post /wp-admin/post-new.php1,545 ▲2618.41 ▼4.72591.89 ▲9.3451.20 ▼2.42
Media Library /wp-admin/upload.php1,395 ▲74.20 ▼0.0192.91 ▼2.9240.17 ▼4.11
hiWeb Migration S /wp-admin/tools.php?page=hw_migration_simple1,6392.1123.5228.54

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • hw_migration_simple_basedir
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • hw_migration_simple_baseurl

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please take a closer look at the following
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hiweb-migration-simple/template/options.php:3
    • > PHP Notice
      Undefined variable: R in wp-content/plugins/hiweb-migration-simple/template/force-re-migrate-done.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'hiweb_migration_simple\\tools' not found in wp-content/plugins/hiweb-migration-simple/template/force-re-migrate-confirm.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function hiweb_migration_simple\\add_action() in wp-content/plugins/hiweb-migration-simple/inc/hooks.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'hiweb_migration_simple\\tools' not found in wp-content/plugins/hiweb-migration-simple/template/force-re-migrate-done.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/hiweb-migration-simple/template/options.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'hiweb_migration_simple\\tools' not found in wp-content/plugins/hiweb-migration-simple/template/frontend.php:17
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/hiweb-migration-simple/template/force-re-migrate-done.php on line 13
    • > PHP Notice
      Undefined variable: R in wp-content/plugins/hiweb-migration-simple/template/force-re-migrate-done.php on line 13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Tags: You are using too many tags: 36 tag instead of maximum 10
  • Screenshots: Add an image for screenshot #1 (Little instruction)
You can take inspiration from this readme.txt

hiweb-migration-simple/hiweb-migration-simple.php 92% from 13 tests

"hiWeb Migration Simple" version 2.0.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin476 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP1195122381
PO File1151573
JavaScript12022

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity14.25
▷ Minimum class complexity9.00
▷ Maximum class complexity27.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27100.00%
▷ Public methods2696.30%
▷ Protected methods00.00%
▷ Private methods13.70%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.10MB with 0.07MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png106.25KB39.19KB▼ 63.12%