78% layouts-importer

Code Review | WPGutenBlog Demo Import

WordPress plugin WPGutenBlog Demo Import scored78%from 54 tests.

About plugin

  • Plugin page: layouts-importer
  • Plugin version: 1.0.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 7, 2021
  • Latest release: Dec 14, 2021
  • Number of updates: 9
  • Update frequency: every 37.9 days
  • Top authors: wpgutenblog (88.89%)avidthemes (22.22%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,121 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.09MB] [CPU: ▼0.33ms] Passed 4 tests

An overview of server-side resources used by WPGutenBlog Demo Import
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.90 ▼2.01
Dashboard /wp-admin3.40 ▲0.0948.08 ▼1.63
Posts /wp-admin/edit.php3.51 ▲0.1549.95 ▲3.21
Add New Post /wp-admin/post-new.php6.00 ▲0.1195.48 ▼0.29
Media Library /wp-admin/upload.php3.32 ▲0.0941.93 ▲2.62
Demo Import /wp-admin/themes.php?page=advanced-import3.2935.22

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 132 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPGutenBlog Demo Import
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.35 ▼0.241.95 ▲0.1741.61 ▼3.68
Dashboard /wp-admin2,225 ▲515.69 ▲0.1195.49 ▲9.9945.85 ▲4.37
Posts /wp-admin/edit.php2,130 ▲302.07 ▲0.0842.25 ▲5.8139.64 ▲2.81
Add New Post /wp-admin/post-new.php1,558 ▲3018.28 ▼4.70610.79 ▼71.3267.11 ▲23.05
Media Library /wp-admin/upload.php1,427 ▲304.19 ▲0.04105.43 ▲0.5446.31 ▲0.63
Demo Import /wp-admin/themes.php?page=advanced-import8212.0123.9428.31

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/layouts-importer/public/partials/gutenblog-demo-import-public-display.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/layouts-importer/admin/templates/traverse-blog.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/layouts-importer/admin/templates/guten-blog.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/layouts-importer/admin/templates/blogzilla.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/layouts-importer/admin/templates/maicha-blog.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
2 plugin tags: demo import, one click demo import

layouts-importer/gutenblog-demo-import.php 85% from 13 tests

The entry point to "WPGutenBlog Demo Import" version 1.0.7 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("layouts-importer.php" instead of "gutenblog-demo-import.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin10,364 lines of code in 102 files:
LanguageFilesBlank linesComment linesLines of code
JSON83009,416
PHP15220537865
CSS27457
JavaScript253226

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods413.33%
▷ Public methods2583.33%
▷ Protected methods00.00%
▷ Private methods516.67%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 compressed PNG files occupy 4.20MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/demo-data/maicha-blog/free-1/screenshot.png470.17KB488.38KB0.00%
includes/demo-data/maicha-blog/pro-4/screenshot.png470.17KB488.38KB0.00%
includes/demo-data/blogzilla/free-1/Screenshot.png1,948.30KB650.68KB▼ 66.60%
includes/demo-data/maicha-blog/pro-3/screenshot.png470.17KB488.38KB0.00%
includes/demo-data/maicha-blog/pro-2/screenshot.png470.17KB488.38KB0.00%