78% sample-data

Code Review | Site Demo Content

WordPress plugin Site Demo Content scored78%from 54 tests.

About plugin

  • Plugin page: sample-data
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 6.3.1
  • First release: Aug 12, 2018
  • Latest release: Jul 23, 2020
  • Number of updates: 9
  • Update frequency: every 79.0 days
  • Top authors: Mahesh901122 (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

200+ active /21,305 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.33MB] [CPU: ▼5.36ms] Passed 4 tests

Server-side resources used by Site Demo Content
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3236.71 ▼0.55
Dashboard /wp-admin3.68 ▲0.3446.98 ▼8.16
Posts /wp-admin/edit.php3.73 ▲0.3847.63 ▲2.52
Add New Post /wp-admin/post-new.php6.22 ▲0.3389.87 ▼15.25
Media Library /wp-admin/upload.php3.54 ▲0.3237.45 ▲4.01
Site Demo Content /wp-admin/tools.php?page=sample-data3.5130.63

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Site Demo Content
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲6513.41 ▼1.271.77 ▲0.0339.19 ▼2.49
Dashboard /wp-admin2,214 ▲345.82 ▲0.8796.22 ▼14.0439.42 ▼0.99
Posts /wp-admin/edit.php2,114 ▲252.31 ▲0.3040.36 ▲3.2634.73 ▼1.86
Add New Post /wp-admin/post-new.php1,531 ▲1223.40 ▲0.19596.55 ▼46.1753.26 ▲11.90
Media Library /wp-admin/upload.php1,409 ▲274.37 ▲0.1497.49 ▼1.0941.82 ▼0.23
Site Demo Content /wp-admin/tools.php?page=sample-data1,2752.2325.1030.86

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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 50% 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
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sample-data/classes/class-sample-data-page.php:48
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/sample-data/sample-data.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/tools.php?page=sample-data
    • > Network (severe)
    https://ps.w.org/woocommerce/assets/icon-256x256.png?rev=1440831 - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8 in sample-data/assets to your readme.txt
You can take inspiration from this readme.txt

sample-data/sample-data.php 92% from 13 tests

"Site Demo Content" version 1.1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 181 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin17,608 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
XML33535415,317
PHP74728121,994
JavaScript13312141
CSS1270110
Markdown125046

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity48.67
▷ Minimum class complexity1.00
▷ Maximum class complexity262.00
Average method complexity4.86
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods74
▷ Static methods34.05%
▷ Public methods4054.05%
▷ Protected methods3344.59%
▷ Private methods11.35%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected