90% demo-content-for-blocks

Code Review | Demo Content for Blocks

WordPress plugin Demo Content for Blocks scored90%from 54 tests.

About plugin

  • Plugin page: demo-content-for-...
  • Plugin version: 1.2.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.4
  • WordPress version: 6.3.1
  • First release: May 16, 2019
  • Latest release: Mar 18, 2020
  • Number of updates: 32
  • Update frequency: every 9.6 days
  • Top authors: melonpan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /891 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
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.02ms] Passed 4 tests

Analyzing server-side resources used by Demo Content for Blocks
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.97 ▼1.02
Dashboard /wp-admin3.33 ▲0.0347.97 ▼6.74
Posts /wp-admin/edit.php3.38 ▲0.0351.69 ▲0.58
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.32 ▼8.90
Media Library /wp-admin/upload.php3.26 ▲0.0336.78 ▲4.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Demo Content for Blocks
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.32 ▼0.051.84 ▲0.1643.86 ▼2.62
Dashboard /wp-admin2,195 ▲185.63 ▼0.0386.57 ▼4.4540.64 ▼0.39
Posts /wp-admin/edit.php2,103 ▼01.99 ▼0.0152.83 ▲15.8635.45 ▲0.47
Add New Post /wp-admin/post-new.php1,537 ▲1123.51 ▲0.44669.98 ▲42.2859.44 ▼10.52
Media Library /wp-admin/upload.php1,397 ▼04.21 ▲0.0398.54 ▼8.9746.39 ▲2.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: blocks, gutenberg, block, content, demo...

demo-content-for-blocks/demo-content-for-blocks.php Passed 13 tests

The main file in "Demo Content for Blocks" v. 1.2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
69 characters long description:
Add blocks with demo/dummy content to your post content in one click.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected184 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP56045182
CSS1001
JavaScript1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.59
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
Namespaces1
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
There were not PNG files found in your plugin