78% data-generator

Code Review | Data Generator

WordPress plugin Data Generator scored78%from 54 tests.

About plugin

  • Plugin page: data-generator
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Oct 1, 2016
  • Latest release: Oct 30, 2016
  • Number of updates: 8
  • Update frequency: every 6.9 days
  • Top authors: lolitaframework (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,188 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.39MB] [CPU: ▼9.18ms] Passed 4 tests

An overview of server-side resources used by Data Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.10 ▲0.6440.93 ▼6.19
Dashboard /wp-admin3.90 ▲0.6048.23 ▼4.30
Posts /wp-admin/edit.php3.93 ▲0.5750.17 ▲1.67
Add New Post /wp-admin/post-new.php5.67 ▼0.2162.23 ▼27.91
Media Library /wp-admin/upload.php3.82 ▲0.6035.64 ▲5.50

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Data Generator
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,992 ▲23513.99 ▼0.364.98 ▲3.1340.15 ▲1.93
Dashboard /wp-admin2,242 ▲574.85 ▼1.03111.85 ▲5.5839.96 ▼3.27
Posts /wp-admin/edit.php2,131 ▲422.05 ▲0.0734.89 ▼1.7931.16 ▼3.63
Add New Post /wp-admin/post-new.php6,245 ▲4,71119.18 ▼3.92855.23 ▲181.1351.45 ▼14.20
Media Library /wp-admin/upload.php1,430 ▲424.22 ▲0.0597.14 ▼13.1742.64 ▼2.44

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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
Please fix the following
  • 19× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader_9.php
    • > /wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader_10.php
    • > /wp-content/plugins/data-generator/LolitaFramework/Configuration/views/meta_box_default.php
    • > /wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader.php
    • > /wp-content/plugins/data-generator/LolitaFramework/Widgets/views/collection.php
    • > /wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader_3.php
    • > /wp-content/plugins/data-generator/LolitaFramework/Controls/Repeater/views/template.php
    • > /wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader_6.php
    • > /wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader_2.php
    • > /wp-content/plugins/data-generator/LolitaFramework/Configuration/views/meta_box_with_controls.php
  • 111× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'datagenerator\\LolitaFramework\\Configuration\\IModule' not found in wp-content/plugins/data-generator/LolitaFramework/Configuration/Modules/ShortCodes.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'datagenerator\\LolitaFramework\\Configuration\\Init' not found in wp-content/plugins/data-generator/LolitaFramework/Configuration/Modules/PostTypes.php:10
    • > PHP Notice
      Undefined variable: me in wp-content/plugins/data-generator/LolitaFramework/Controls/Text/views/text.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to a member function getOptions() on null in wp-content/plugins/data-generator/LolitaFramework/Controls/Radios/views/radios.php:1
    • > PHP Notice
      Undefined variable: class in wp-content/plugins/data-generator/LolitaFramework/CssLoader/views/lf_css_loader_1.php on line 52
    • > PHP Notice
      Undefined variable: me in wp-content/plugins/data-generator/LolitaFramework/Controls/Gallery/views/gallery.php on line 1
    • > PHP Notice
      Undefined variable: control in wp-content/plugins/data-generator/LolitaFramework/Controls/Button/views/customize_button.php on line 4
    • > PHP Notice
      Undefined variable: me in wp-content/plugins/data-generator/LolitaFramework/Controls/Select/views/select.php on line 1
    • > PHP Notice
      Undefined variable: controls in wp-content/plugins/data-generator/LolitaFramework/Configuration/views/meta_box_with_controls.php on line 3
    • > PHP Notice
      Undefined variable: me in wp-content/plugins/data-generator/LolitaFramework/Controls/Password/views/password.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: demo, data, creator, simple data, generator...

data-generator/datagenerator.php 77% from 13 tests

The main PHP file in "Data Generator" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 233 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("data-generator.php" instead of "datagenerator.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin11,314 lines of code in 158 files:
LanguageFilesBlank linesComment linesLines of code
PHP1048523,3066,286
TypeScript134462,8151,496
Sass68311,380
JavaScript101529061,101
JSON1400919
Markdown222055
CSS60636
PO File26834
XML1117

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.42
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity2.21
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces23
Interfaces3
Traits0
Classes62
▷ Abstract classes23.23%
▷ Concrete classes6096.77%
▷ Final classes00.00%
Methods397
▷ Static methods16341.06%
▷ Public methods33784.89%
▷ Protected methods51.26%
▷ Private methods5513.85%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants21
▷ Global constants1047.62%
▷ Class constants1152.38%
▷ Public constants11100.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.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
LolitaFramework/Controls/Repeater/assets/images/sprite.png17.94KB0.93KB▼ 94.83%