84% directly-import

Code Review | Directly Import

WordPress plugin Directly Import scored 84% from 54 tests.

About plugin

  • Plugin page: directly-import
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 5.9.2
  • First release: Apr 4, 2020
  • Latest release: Apr 8, 2020
  • Number of updates: 5
  • Update frequency: every 0.8 days
  • Top authors: rnoakes3rd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 361 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.13MB] [CPU: ▼298.74ms] Passed 4 tests

Analyzing server-side resources used by Directly Import
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2055.08 ▲3.29
Dashboard /wp-admin3.56 ▲0.1635.25 ▲2.92
Posts /wp-admin/edit.php3.79 ▲0.1537.46 ▲1.33
Add New Post /wp-admin/post-new.php7.03 ▲0.06104.41 ▼1,191.42
Media Library /wp-admin/upload.php3.44 ▲0.1424.00 ▼7.78
Directly Import /wp-admin/tools.php?page=directly_import_sites3.6434.10
Directly Import /wp-admin/options-general.php?page=directly_import_settings3.4921.39

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 156 new files
Database: no new tables, 2 new options
New WordPress options
directly_import_settings
directly_import_version

Browser metrics Passed 4 tests

A check of browser resources used by Directly Import
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,773 ▲1916.23 ▲0.555.64 ▼0.352.19 ▼0.83
Dashboard /wp-admin2,902 ▲416.14 ▼0.03117.79 ▼19.03155.48 ▼5.29
Posts /wp-admin/edit.php2,698 ▲103.23 ▼0.0060.74 ▼1.80144.43 ▼0.17
Add New Post /wp-admin/post-new.php1,674 ▼7818.10 ▼2.91399.38 ▼32.86155.26 ▼3.07
Media Library /wp-admin/upload.php1,708 ▲105.47 ▼0.05136.93 ▼2.22184.65 ▼2.37
Directly Import /wp-admin/tools.php?page=directly_import_sites1,3733.1374.13141.48
Directly Import /wp-admin/options-general.php?page=directly_import_settings1,5553.5475.56136.23

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 options in the database
    • directly_import_version
    • directly_import_settings

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=directly_import_settings
    • > Notice in wp-content/plugins/directly-import/includes/core/class-settings.php+387
    Undefined variable: plugin_label

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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: comments, taxonomies, acf, attachments, importer...

directly-import/directly-import.php Passed 13 tests

The main file in "Directly Import" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
70 characters long description:
Import posts and related records directly from another WordPress site.

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
Good job! No executable or dangerous file extensions detected7,795 lines of code in 148 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1274349933,893
PHP176471,8092,731
CSS225441,149
Markdown14018
JSON1004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity27.87
▷ Minimum class complexity1.00
▷ Maximum class complexity115.00
Average method complexity5.11
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes16.67%
▷ Concrete classes1493.33%
▷ Final classes14100.00%
Methods98
▷ Static methods2525.51%
▷ Public methods7071.43%
▷ Protected methods88.16%
▷ Private methods2020.41%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants28
▷ Global constants00.00%
▷ Class constants28100.00%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.27MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/release/images/YourWordPressDXP300x600.png136.86KB60.69KB▼ 55.65%
assets/debug/images/robert-noakes.png2.91KB2.87KB▼ 1.34%
assets/debug/images/YourWordPressDXP300x600.png136.86KB60.69KB▼ 55.65%
assets/release/images/robert-noakes.png2.91KB2.87KB▼ 1.34%