88% tp2wp-importer

Code Review | TP2WP Importer

WordPress plugin TP2WP Importer scored 88% from 54 tests.

About plugin

  • Plugin page: tp2wp-importer
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.2
  • WordPress version: 5.8.1
  • First release: Jan 14, 2015
  • Latest release: Jun 20, 2019
  • Number of updates: 36
  • Update frequency: every 44.9 days
  • Top authors: ReadyMadeWeb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 4,197 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼136.27ms] Passed 4 tests

An overview of server-side resources used by TP2WP Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1339.41 ▲15.11
Dashboard /wp-admin3.11 ▲0.0649.35 ▲14.63
Posts /wp-admin/edit.php3.16 ▲0.0646.97 ▲1.50
Add New Post /wp-admin/post-new.php5.47 ▲0.0491.61 ▼561.85
Media Library /wp-admin/upload.php3.06 ▲0.0537.61 ▲0.66
2. Content /wp-admin/admin.php?page=tp2wp-importer-content3.0033.35
1. Status Check /wp-admin/admin.php?page=tp2wp-importer3.2427.56
3. Attachments /wp-admin/admin.php?page=tp2wp-importer-attachments3.0734.15

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for TP2WP Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,718 ▲11315.86 ▼0.147.77 ▼1.0049.31 ▼3.30
Dashboard /wp-admin3,012 ▲786.02 ▲0.05143.71 ▼14.42122.95 ▲4.89
Posts /wp-admin/edit.php2,778 ▲392.70 ▲0.0167.03 ▼3.2097.56 ▲4.32
Add New Post /wp-admin/post-new.php1,616 ▼6718.63 ▲0.24379.56 ▼32.03110.56 ▼8.34
Media Library /wp-admin/upload.php1,849 ▲425.00 ▲0.03170.72 ▼2.54123.26 ▼6.94
2. Content /wp-admin/admin.php?page=tp2wp-importer-content1,8203.1669.2475.54
1. Status Check /wp-admin/admin.php?page=tp2wp-importer1,4612.1061.3180.14
3. Attachments /wp-admin/admin.php?page=tp2wp-importer-attachments1,3752.3870.75110.17

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=tp2wp-importer-content
    • > Deprecated in wp-content/plugins/tp2wp-importer/content/importer.php+25
    Methods with the same name as their class will not be constructors in a future version of PHP; TP2WP_Import has a deprecated constructor
    • > GET request to /wp-admin/admin.php?page=tp2wp-importer-content
    • > User deprecated in wp-includes/functions.php+5221
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=tp2wp-importer-content
    • > User deprecated in wp-includes/functions.php+5221
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 14× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp2wp-importer/attachments/page.php:23
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/import.php): failed to open stream: No such file or directory in wp-content/plugins/tp2wp-importer/content/importer.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tp2wp_importer_tabs() in wp-content/plugins/tp2wp-importer/status/templates/page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp2wp-importer/status/page.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/tp2wp-importer/status/main.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tp2wp_importer_url() in wp-content/plugins/tp2wp-importer/general/templates/tabs.php:24
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/import.php' (include_path='.:/usr/share/php') in wp-content/plugins/tp2wp-importer/content/importer.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function tp2wp_importer_tabs() in wp-content/plugins/tp2wp-importer/attachments/templates/page.php:2
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/tp2wp-importer/content/importer.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tp2wp-importer/content/main.php:13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need to be fixed:
  • Tags: You are using too many tags: 14 tag instead of maximum 10
  • Donate link: Invalid url: ""
The official readme.txt might help

tp2wp-importer/tp2wp-importer.php Passed 13 tests

The main PHP file in "TP2WP Importer" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
Collection of functionality to ease importing Typepad data into Wordpress.

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
No dangerous file extensions were detected2,975 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP155318852,539
JavaScript28275307
Markdown110076
CSS212053

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity54.20
▷ Minimum class complexity19.00
▷ Maximum class complexity161.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity47.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods46
▷ Static methods00.00%
▷ Public methods46100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin