84% wordpress-importer

Code Review | WordPress Importer

WordPress plugin WordPress Importer scored 84% from 54 tests.

About plugin

  • Plugin page: wordpress-importer
  • Plugin version: 0.8.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: May 20, 2010
  • Latest release: Apr 28, 2023
  • Number of updates: 87
  • Update frequency: every 54.3 days
  • Top authors: duck_ (49.43%)ocean90 (13.79%)nacin (11.49%)westi (6.9%)Otto42 (5.75%)

Code review

54 tests

User reviews

305 reviews

Install metrics

3,000,000+ active / 47,024,029 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.00MB] [CPU: ▼2.64ms] Passed 4 tests

Analyzing server-side resources used by WordPress Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.02 ▼1.32
Dashboard /wp-admin3.31 ▲0.0144.44 ▼2.20
Posts /wp-admin/edit.php3.36 ▲0.0045.08 ▼1.41
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.50 ▼5.61
Media Library /wp-admin/upload.php3.23 ▲0.0034.91 ▲0.54

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Importer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.19 ▼1.211.70 ▼0.2241.10 ▼7.79
Dashboard /wp-admin2,209 ▲245.88 ▼0.0297.86 ▼3.8139.56 ▲1.36
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0441.17 ▲4.1334.02 ▼0.37
Add New Post /wp-admin/post-new.php1,542 ▲2818.40 ▲0.85636.14 ▲1.6052.63 ▼2.66
Media Library /wp-admin/upload.php1,391 ▼04.17 ▼0.03110.56 ▲6.1042.12 ▼2.25

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _deprecated_file() in wp-content/plugins/wordpress-importer/parsers.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Importer' not found in wp-content/plugins/wordpress-importer/class-wp-import.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
2 plugin tags: importer, wordpress

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

The principal PHP file in "WordPress Importer" v. 0.8.1 is loaded by WordPress automatically on each request
101 characters long description:
Import posts, pages, comments, custom fields, categories, tags and more from a WordPress export file.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected1,790 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP83304161,790

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity67.40
▷ Minimum class complexity13.00
▷ Maximum class complexity214.00
Average method complexity7.38
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods52
▷ Static methods23.85%
▷ Public methods4994.23%
▷ Protected methods35.77%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected