83% template-sell-demo-importer

Code Review | Template Sell Demo Importer

WordPress plugin Template Sell Demo Importer scored83%from 54 tests.

About plugin

  • Plugin page: template-sell-dem...
  • Plugin version: 1.0.2
  • PHP compatiblity: 4.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.2
  • WordPress version: 6.3.1
  • First release: Oct 18, 2020
  • Latest release: Mar 21, 2022
  • Number of updates: 8
  • Update frequency: every 65.1 days
  • Top authors: templatesell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,041 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.93ms] Passed 4 tests

This is a short check of server-side resources used by Template Sell Demo Importer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.51 ▲0.03
Dashboard /wp-admin3.31 ▲0.0048.35 ▼1.92
Posts /wp-admin/edit.php3.36 ▲0.0049.23 ▼1.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.57 ▼5.96
Media Library /wp-admin/upload.php3.23 ▲0.0037.32 ▼2.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Template Sell Demo Importer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.151.89 ▲0.3042.59 ▲1.56
Dashboard /wp-admin2,195 ▲155.63 ▲0.0090.50 ▼1.9741.10 ▼4.91
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0140.85 ▲2.4935.36 ▼4.22
Add New Post /wp-admin/post-new.php1,526 ▼023.81 ▲0.46642.15 ▼32.8353.54 ▼2.23
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.02101.22 ▼7.6244.34 ▼0.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/template-sell-demo-importer/prefer-dummy-data/prefer-dummy-data.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/template-sell-demo-importer/docile-dummy-data/docile-dummy-data.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/template-sell-demo-importer/intimate-dummy-data/intimate-dummy-data.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/template-sell-demo-importer/polite-dummy-data/polite-dummy-data.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 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
3 plugin tags: dummy data files, demo data, one click demo import

template-sell-demo-importer/templatesell-demo-importer.php 69% from 13 tests

Analyzing the main PHP file in "Template Sell Demo Importer" version 1.0.2
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("template-sell-demo-importer.php" instead of "templatesell-demo-importer.php")
  • Description: The description should be shorter than 140 characters (currently 168 characters long)
  • Domain Path: The domain path folder was not found ("/languages")
  • 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 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected62,580 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
XML103,2446,23962,301
PHP648142279

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods125.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.12MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
rector-dummy-data/dummy-data-files/assets/elementor.png123.09KB134.99KB0.00%