94% ds-titan

Code Review | DSTitan

WordPress plugin DSTitan scored 94% from 54 tests.

About plugin

  • Plugin page: ds-titan
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0
  • WordPress version: 5.8.1
  • First release: Jun 26, 2019
  • Latest release: Jul 4, 2019
  • Number of updates: 13
  • Update frequency: every 1.1 days
  • Top authors: dstitan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 596 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.00MB] [CPU: ▼141.04ms] Passed 4 tests

An overview of server-side resources used by DSTitan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1233.07 ▲15.25
Dashboard /wp-admin3.06 ▲0.0044.88 ▲0.12
Posts /wp-admin/edit.php3.11 ▲0.0041.29 ▲0.28
Add New Post /wp-admin/post-new.php5.42 ▼0.0187.78 ▼553.14
Media Library /wp-admin/upload.php3.00 ▼0.0128.39 ▼11.43

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for DSTitan
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.04 ▲0.0813.36 ▲2.4848.12 ▼3.01
Dashboard /wp-admin2,973 ▲396.00 ▲0.00148.68 ▲7.54110.25 ▲1.55
Posts /wp-admin/edit.php2,739 ▲32.70 ▼0.0264.37 ▲1.2294.12 ▲1.88
Add New Post /wp-admin/post-new.php1,683 ▲18118.53 ▼0.13366.87 ▼2.8799.98 ▼4.65
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.00159.55 ▲1.28113.54 ▼4.57

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% 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 50% 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
  • 45× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/promises/src/EachPromise.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/guzzle/src/Client.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/psr7/src/DroppingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/ds-titan/vendor/psr/http-message/src/RequestInterface.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Psr7\\Request' not found in wp-content/plugins/ds-titan/vendor/guzzlehttp/psr7/src/ServerRequest.php:25

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: dstitan, products, woocommerce

ds-titan/ds-titan.php 92% from 13 tests

The main PHP file in "DSTitan" ver. 0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
No dangerous file extensions were detected12,574 lines of code in 120 files:
LanguageFilesBlank linesComment linesLines of code
PHP981,8205,0058,855
Markdown1099503,193
JSON700467
XML24033
YAML14014
make1409
CSS1003

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.45
Average class complexity14.28
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.76
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces9
Interfaces14
Traits2
Classes67
▷ Abstract classes00.00%
▷ Concrete classes67100.00%
▷ Final classes811.94%
Methods660
▷ Static methods6710.15%
▷ Public methods54682.73%
▷ Protected methods40.61%
▷ Private methods11016.67%
Functions143
▷ Named functions5639.16%
▷ Anonymous functions8760.84%
Constants57
▷ Global constants00.00%
▷ Class constants57100.00%
▷ Public constants57100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.70MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png135.59KB46.55KB▼ 65.67%
assets/icon-256x256.png8.35KB4.79KB▼ 42.56%
assets/icon-256x256-a.png9.59KB4.62KB▼ 51.81%
assets/icon-128x128.png4.39KB2.69KB▼ 38.65%
assets/banner-1544x500.png554.85KB165.84KB▼ 70.11%