78% flawless-themes-demo-importer

Code Review | Flawless Themes Demo Importer

WordPress plugin Flawless Themes Demo Importer scored78%from 54 tests.

About plugin

  • Plugin page: flawless-themes-d...
  • Plugin version: 1.0.18
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Sep 10, 2020
  • Latest release: Jan 5, 2023
  • Number of updates: 31
  • Update frequency: every 27.4 days
  • Top authors: flawlesstheme (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

2,000+ active /31,079 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.27ms] Passed 4 tests

This is a short check of server-side resources used by Flawless Themes Demo Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1044.37 ▲0.72
Dashboard /wp-admin3.40 ▲0.1055.77 ▼2.31
Posts /wp-admin/edit.php3.52 ▲0.1649.34 ▼0.59
Add New Post /wp-admin/post-new.php6.01 ▲0.1187.81 ▼10.90
Media Library /wp-admin/upload.php3.33 ▲0.0938.24 ▲2.23

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 84 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Flawless Themes Demo Importer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲14313.65 ▼0.908.93 ▲7.1644.85 ▼3.40
Dashboard /wp-admin2,199 ▲225.49 ▼0.0984.58 ▼16.8140.30 ▼3.33
Posts /wp-admin/edit.php2,107 ▲42.02 ▲0.0035.66 ▼6.7235.80 ▲1.89
Add New Post /wp-admin/post-new.php1,546 ▲2022.93 ▼0.13654.46 ▼8.4554.05 ▲3.02
Media Library /wp-admin/upload.php1,410 ▲74.20 ▲0.06100.36 ▲7.6443.78 ▲2.04

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/flawless-themes-demo-importer/public/partials/flawless-demo-importer-public-display.php
    • > /wp-content/plugins/flawless-themes-demo-importer/admin/partials/flawless-demo-importer-admin-display.php
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/flawless-themes-demo-importer/includes/class-flawless-demo-importer.php:372

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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: "flawlessthemes.com"
Please take inspiration from this readme.txt

flawless-themes-demo-importer/flawless-demo-importer.php 85% from 13 tests

This is the main PHP file of "Flawless Themes Demo Importer" version 1.0.18, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("flawless-themes-demo-importer.php" instead of "flawless-demo-importer.php")

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
Success! There were no dangerous files found in this plugin117,802 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
XML152,6421,612117,421
PHP12131537337
CSS22838
JavaScript24546

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 compressed PNG files occupy 4.27MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/theme-bundle.png122.71KB33.96KB▼ 72.33%
public/img/ft-directory-free.png324.82KB332.24KB0.00%
public/img/jobstack.png270.62KB275.26KB0.00%
public/img/lms-academic-free.png79.31KB79.65KB0.00%
public/img/coursemax.png285.61KB289.87KB0.00%