74% dominokit

Code Review | DominoKit

WordPress plugin DominoKit scored 74% from 54 tests.

About plugin

  • Plugin page: dominokit
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Dec 6, 2022
  • Latest release: Jan 22, 2023
  • Number of updates: 4
  • Update frequency: every 11.8 days
  • Top authors: domiinodev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 1,321 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.76MB] [CPU: ▲2.75ms] Passed 4 tests

An overview of server-side resources used by DominoKit
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.22 ▲0.7546.53 ▼3.01
Dashboard /wp-admin4.07 ▲0.7753.09 ▲2.91
Posts /wp-admin/edit.php4.12 ▲0.7654.99 ▲12.30
Add New Post /wp-admin/post-new.php6.65 ▲0.76103.02 ▲1.14
Media Library /wp-admin/upload.php3.99 ▲0.7645.33 ▲9.97
Install Plugins /wp-admin/plugins.php?page=dominokit-install-plugins4.0038.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by DominoKit
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.18 ▼1.121.74 ▼0.3142.21 ▼4.89
Dashboard /wp-admin2,231 ▲405.80 ▼0.10101.47 ▼6.0341.39 ▼6.53
Posts /wp-admin/edit.php2,125 ▲362.05 ▼0.0041.04 ▲0.1139.96 ▲4.00
Add New Post /wp-admin/post-new.php1,538 ▲1921.57 ▼1.55697.23 ▲62.3455.30 ▼0.05
Media Library /wp-admin/upload.php1,427 ▲424.23 ▲0.0197.27 ▼2.2643.90 ▲0.09
Install Plugins /wp-admin/plugins.php?page=dominokit-install-plugins9592.0626.5029.62

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 141× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\InvalidArgumentException' not found in wp-content/plugins/dominokit/vendor/nesbot/carbon/src/Carbon/Exceptions/NotAPeriodException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DependencyInjection\\Compiler\\AbstractRecursivePass' not found in wp-content/plugins/dominokit/vendor/symfony/translation/DependencyInjection/TranslatorPathsPass.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\RuntimeException' not found in wp-content/plugins/dominokit/vendor/nesbot/carbon/src/Carbon/Exceptions/EndLessPeriodException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon\\Factory' not found in wp-content/plugins/dominokit/vendor/nesbot/carbon/src/Carbon/FactoryImmutable.php:240
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/dominokit/vendor/morilog/jalali/tests/JalalianTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\Exception\\ExceptionInterface' not found in wp-content/plugins/dominokit/vendor/symfony/translation/Exception/ProviderExceptionInterface.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Polyfill\\Php80\\PhpToken' not found in wp-content/plugins/dominokit/vendor/symfony/polyfill-php80/Resources/stubs/PhpToken.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Translation\\MessageCatalogueInterface' not found in wp-content/plugins/dominokit/vendor/symfony/translation/MessageCatalogue.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Translation\\Loader\\FileLoader' not found in wp-content/plugins/dominokit/vendor/symfony/translation/Loader/MoFileLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Carbon\\Exceptions\\Exception' not found in wp-content/plugins/dominokit/vendor/nesbot/carbon/src/Carbon/Exceptions/BadMethodCallException.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Screenshots are stored in the /assets/screenshots.), #2 (This is the second screen shot)
The official readme.txt might help

dominokit/dominokit.php Passed 13 tests

The main PHP file in "DominoKit" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
57 characters long description:
ووکامرس خود را سفارشی سازی کنید

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/dominokit/vendor/bin/carbon.bat
      • wp-content/plugins/dominokit/vendor/nesbot/carbon/bin/carbon.bat
81,101 lines of code in 919 files:
LanguageFilesBlank linesComment linesLines of code
PHP8648,48528,78341,637
CSS147,5261623,202
JavaScript112471,64610,912
XSD392482,803
JSON11001,254
Markdown93340836
PO File1143230394
YAML2152438
XML10016
DOS Batch2008
SVG1001

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity16.62
▷ Minimum class complexity1.00
▷ Maximum class complexity322.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces36
Interfaces28
Traits28
Classes163
▷ Abstract classes169.82%
▷ Concrete classes14790.18%
▷ Final classes1711.56%
Methods2,049
▷ Static methods50824.79%
▷ Public methods1,77286.48%
▷ Protected methods1547.52%
▷ Private methods1236.00%
Functions336
▷ Named functions10731.85%
▷ Anonymous functions22968.15%
Constants203
▷ Global constants178.37%
▷ Class constants18691.63%
▷ Public constants18398.39%

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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshots/Dominokit-128.png4.54KB2.86KB▼ 36.89%
assets/screenshots/Dominokit-256.png8.58KB5.01KB▼ 41.62%