61% wp-dummy-content-generator

Code Review | WP Dummy Content Generator

WordPress plugin WP Dummy Content Generator scored61%from 54 tests.

About plugin

  • Plugin page: wp-dummy-content-...
  • Plugin version: 3.1.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Jan 21, 2021
  • Latest release: Oct 26, 2023
  • Number of updates: 35
  • Update frequency: every 28.8 days
  • Top authors: deepakanand767 (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

4,000+ active /54,116 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼0.68ms] Passed 4 tests

Analyzing server-side resources used by WP Dummy Content Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1742.39 ▲2.06
Dashboard /wp-admin3.48 ▲0.1747.26 ▲3.54
Posts /wp-admin/edit.php3.59 ▲0.2343.17 ▼1.55
Add New Post /wp-admin/post-new.php6.08 ▲0.1982.36 ▼5.91
Media Library /wp-admin/upload.php3.40 ▲0.1736.46 ▲2.69
Dummy Content Generator /wp-admin/admin.php?page=wp_dummy_content_generator-dashboard3.3731.63
Generate Users /wp-admin/admin.php?page=wp_dummy_content_generator-users3.3731.30
Generate Products /wp-admin/admin.php?page=wp_dummy_content_generator-products3.3729.86
Generate Posts /wp-admin/admin.php?page=wp_dummy_content_generator-posts3.3732.29
Manage Thumbnails /wp-admin/admin.php?page=wp_dummy_content_generator-thumbnails3.3831.70

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 636 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

This is an overview of browser requirements for WP Dummy Content Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,883 ▲12214.74 ▲0.301.71 ▲0.0143.49 ▼0.98
Dashboard /wp-admin2,270 ▲904.94 ▼0.7188.32 ▲0.1137.67 ▲0.87
Posts /wp-admin/edit.php2,172 ▲722.31 ▲0.3236.47 ▲1.0534.54 ▲0.32
Add New Post /wp-admin/post-new.php1,584 ▲5823.40 ▲0.04652.96 ▼40.1051.66 ▼9.93
Media Library /wp-admin/upload.php1,472 ▲754.53 ▲0.3095.88 ▼5.0741.43 ▼0.47
Dummy Content Generator /wp-admin/admin.php?page=wp_dummy_content_generator-dashboard9361.8526.4244.23
Generate Users /wp-admin/admin.php?page=wp_dummy_content_generator-users9931.8726.0724.51
Generate Products /wp-admin/admin.php?page=wp_dummy_content_generator-products8111.8827.4121.18
Generate Posts /wp-admin/admin.php?page=wp_dummy_content_generator-posts1,0731.9026.4923.48
Manage Thumbnails /wp-admin/admin.php?page=wp_dummy_content_generator-thumbnails8291.8627.6425.60

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-dummy-content-generator/admin/template/wp_dummy_content_generator-products.php
    • > /wp-content/plugins/wp-dummy-content-generator/admin/template/wp_dummy_content_generator-dashboard.php
    • > /wp-content/plugins/wp-dummy-content-generator/admin/partials/wp_dummy_content_generator-admin-display.php
  • 483× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Address' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/me_ME/Address.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Text' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/de_CH/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\PhoneNumber' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/el_CY/PhoneNumber.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\PhoneNumber' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/nl_NL/PhoneNumber.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\de_DE\\Text' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/de_AT/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_users() in wp-content/plugins/wp-dummy-content-generator/admin/partials/users/wp_dummy_content_generator-listUsers.php:2
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\Capability\\CommandProvider' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/vendor/bamarni/composer-bin-plugin/src/CommandProvider.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\PhoneNumber' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/en_NZ/PhoneNumber.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\Text' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/hu_HU/Text.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Faker\\Provider\\it_IT\\Person' not found in wp-content/plugins/wp-dummy-content-generator/Faker-main/src/Faker/Provider/it_CH/Person.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=wp_dummy_content_generator-posts
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wp_dummy_content_generator-posts 185 The specified value "2023/10/27" does not conform to the required format, "yyyy-MM-dd".
    • > GET request to /wp-admin/admin.php?page=wp_dummy_content_generator-posts
    • > Rendering (warning) in unknown
    /wp-admin/admin.php?page=wp_dummy_content_generator-posts 188 The specified value "2023/10/27" does not conform to the required format, "yyyy-MM-dd".

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

wp-dummy-content-generator/wp_dummy_content_generator.php 77% from 13 tests

"WP Dummy Content Generator" version 3.1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-dummy-content-generator.php" instead of "wp_dummy_content_generator.php")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Description: Please don't use more than 140 characters for the plugin description (currently 365 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
It is important to fix the following items
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-dummy-content-generator/Faker-main/vendor/bin/simple-phpunit.bat
119,262 lines of code in 586 files:
LanguageFilesBlank linesComment linesLines of code
PHP56422,25214,103110,382
JavaScript21,9796,9916,328
CSS331521,408
JSON700491
Markdown81410419
XML100230
DOS Batch1004

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.54
▷ Minimum class complexity1.00
▷ Maximum class complexity85.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces94
Interfaces15
Traits18
Classes503
▷ Abstract classes10.20%
▷ Concrete classes50299.80%
▷ Final classes142.79%
Methods1,549
▷ Static methods81352.49%
▷ Public methods1,40490.64%
▷ Protected methods644.13%
▷ Private methods815.23%
Functions171
▷ Named functions4425.73%
▷ Anonymous functions12774.27%
Constants62
▷ Global constants58.06%
▷ Class constants5791.94%
▷ Public constants57100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/sort_desc.png0.15KB0.25KB0.00%
admin/images/sort_both.png0.20KB0.29KB0.00%
admin/images/sort_desc_disabled.png0.14KB0.25KB0.00%
admin/images/sort_asc.png0.16KB0.25KB0.00%
admin/images/sort_asc_disabled.png0.14KB0.25KB0.00%