83% web-theme-space-demos

Code Review | TSP Demos Installer

WordPress plugin TSP Demos Installer scored83%from 54 tests.

About plugin

  • Plugin page: web-theme-space-d...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.8
  • WordPress version: 6.3.1
  • First release: Aug 7, 2021
  • Latest release: Aug 7, 2021
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: wpbusinessthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /308 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
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.05ms] Passed 4 tests

Server-side resources used by TSP Demos Installer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1037.27 ▼4.03
Dashboard /wp-admin3.41 ▲0.0748.10 ▼8.73
Posts /wp-admin/edit.php3.52 ▲0.1749.81 ▲1.43
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.31 ▼4.88
Media Library /wp-admin/upload.php3.33 ▲0.1137.90 ▲1.82

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
__tsp_demos_setup_do_redirect
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by TSP Demos Installer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲9613.59 ▼0.802.00 ▲0.3949.11 ▲7.80
Dashboard /wp-admin2,223 ▲325.81 ▼0.0897.29 ▼4.6341.28 ▼3.25
Posts /wp-admin/edit.php2,108 ▲162.04 ▲0.0341.58 ▲0.5638.22 ▲0.64
Add New Post /wp-admin/post-new.php1,526 ▲1217.70 ▲0.21589.47 ▼68.9151.78 ▲1.31
Media Library /wp-admin/upload.php1,405 ▲174.22 ▲0.02103.34 ▲8.5446.88 ▲2.38

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • __tsp_demos_setup_do_redirect
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/web-theme-space-demos/web-theme-space-demos.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "wpbusinessthemes.com"
  • Screenshots: Please add an image for screenshot #1 (TSP Demos Setup)
The official readme.txt is a good inspiration

web-theme-space-demos/web-theme-space-demos.php 85% from 13 tests

The main PHP script in "TSP Demos Installer" version 1.0.1 is automatically included on every request by WordPress
The following require your attention:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin555 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP9165501470
CSS16156
JavaScript15523
JSON6006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.29
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods618.18%
▷ Public methods2987.88%
▷ Protected methods00.00%
▷ Private methods412.12%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 2.45MB with 2.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/demo-data/common/business/screenshot.png1,720.69KB308.20KB▼ 82.09%
includes/demo-data/common/shop/screenshot.png785.33KB114.18KB▼ 85.46%