10% multilingual-demo-data-creator

Code Review | Demo Data Creator

WordPress plugin Demo Data Creator scored10%from 54 tests.

About plugin

  • Plugin page: multilingual-demo...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.8
  • WordPress version: 6.3.1
  • First release: Jan 14, 2014
  • Latest release: Jan 14, 2014
  • Number of updates: 8
  • Update frequency: every 0.8 days
  • Top authors: brooksX (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,556 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/multilingual-demo-data-creator/demodata.php+74
    Creating default object from empty value

Server metrics [RAM: ▼1.52MB] [CPU: ▼49.75ms] Passed 4 tests

This is a short check of server-side resources used by Demo Data Creator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.47 ▼0.996.01 ▼40.34
Dashboard /wp-admin2.49 ▼0.816.41 ▼46.44
Posts /wp-admin/edit.php2.50 ▼0.877.90 ▼36.95
Add New Post /wp-admin/post-new.php2.49 ▼3.407.76 ▼75.28
Media Library /wp-admin/upload.php2.49 ▼0.746.26 ▼31.74
M-Demo Data Creator /wp-admin/tools.php?page=wmdd_form2.507.89

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Demo Data Creator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.25 ▼1.131.73 ▼0.0138.66 ▼9.13
Dashboard /wp-admin2,210 ▲224.85 ▼1.0197.45 ▼7.5241.35 ▼4.00
Posts /wp-admin/edit.php2,093 ▲42.00 ▲0.0044.13 ▲10.7842.44 ▲5.75
Add New Post /wp-admin/post-new.php1,538 ▲523.30 ▲0.18591.17 ▼170.7352.35 ▼5.24
Media Library /wp-admin/upload.php1,395 ▲74.15 ▼0.0796.97 ▼17.4340.87 ▼7.39
M-Demo Data Creator /wp-admin/tools.php?page=wmdd_form9932.0724.2528.18

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/multilingual-demo-data-creator/demodata.php+74
    Creating default object from empty value
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/tools.php?page=wmdd_form
    • > Warning in wp-content/plugins/multilingual-demo-data-creator/demodata.php+74
    Creating default object from empty value

SRP 0% from 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
Please take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/multilingual-demo-data-creator/lang-data/en.php
    • > /wp-content/plugins/multilingual-demo-data-creator/lang-data/ru.php
    • > /wp-content/plugins/multilingual-demo-data-creator/lang-data/fr.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/file.php): failed to open stream: No such file or directory in wp-content/plugins/multilingual-demo-data-creator/demodata.php on line 29
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/multilingual-demo-data-creator/demodata.php on line 29
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/file.php' (include_path='.:/usr/share/php') in wp-content/plugins/multilingual-demo-data-creator/demodata.php on line 29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Single blog admin view), #2 (Multisite admin view)
You can look at the official readme.txt

multilingual-demo-data-creator/demodata.php 85% from 13 tests

This is the main PHP file of "Demo Data Creator" version 0.1, 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:
  • Description: Please don't use more than 140 characters for the plugin description (currently 376 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("multilingual-demo-data-creator.php" instead of "demodata.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 plugin1,402 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP43072101,402

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions42
▷ Named functions42100.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 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
zanto-logo.png1.35KB0.66KB▼ 50.83%