89% import-from-ghost

Code Review | Ghost Importer

WordPress plugin Ghost Importer scored89%from 54 tests.

About plugin

  • Plugin page: import-from-ghost
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8
  • WordPress version: 6.3.1
  • First release: Jun 27, 2017
  • Latest release: Jun 27, 2017
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tysonarmstrong (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /2,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Ghost Importer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.88 ▼2.55
Dashboard /wp-admin3.37 ▲0.0249.22 ▼15.27
Posts /wp-admin/edit.php3.48 ▲0.1349.91 ▼3.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0686.55 ▼22.62
Media Library /wp-admin/upload.php3.29 ▲0.0634.00 ▼1.57
Ghost Importer /wp-admin/tools.php?page=ghost_importer3.2630.87

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: 1 new table, 6 new options
New tables
wp_ghostimporter_log
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Ghost Importer
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▼0.041.77 ▼0.4239.29 ▼1.63
Dashboard /wp-admin2,196 ▲155.50 ▼0.2389.15 ▼13.6539.32 ▼3.46
Posts /wp-admin/edit.php2,104 ▲11.99 ▲0.0340.48 ▲2.7736.34 ▲2.12
Add New Post /wp-admin/post-new.php1,529 ▲323.04 ▼0.27663.45 ▼18.8849.69 ▼11.49
Media Library /wp-admin/upload.php1,404 ▲44.14 ▼0.0298.36 ▼4.3542.68 ▲0.80
Ghost Importer /wp-admin/tools.php?page=ghost_importer8112.0025.3432.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

import-from-ghost/ghost-importer.php 85% from 13 tests

The entry point to "Ghost Importer" version 0.1.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("import-from-ghost.php" instead of "ghost-importer.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected305 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14929261
JavaScript13244

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity44.00
▷ Minimum class complexity44.00
▷ Maximum class complexity44.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods317.65%
▷ Public methods1058.82%
▷ Protected methods00.00%
▷ Private methods741.18%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 images were found in this plugin