84% darujme

Code Review | Darujme

WordPress plugin Darujme scored84%from 54 tests.

About plugin

  • Plugin page: darujme
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.3.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 24, 2022
  • Latest release: Nov 13, 2022
  • Number of updates: 10
  • Update frequency: every 8.1 days
  • Top authors: wpify (80%)mejta (30%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /701 total downloads

Benchmarks

Plugin footprint 83% from 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: ▲1.03MB] [CPU: ▼1.43ms] Passed 4 tests

An overview of server-side resources used by Darujme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.80 ▲1.3455.36 ▲15.18
Dashboard /wp-admin4.62 ▲1.2862.63 ▼0.70
Posts /wp-admin/edit.php4.67 ▲1.3164.88 ▲15.59
Add New Post /wp-admin/post-new.php6.15 ▲0.2667.79 ▼35.78
Media Library /wp-admin/upload.php4.48 ▲1.2551.87 ▲19.92
WPify Logs /wp-admin/tools.php?page=wpify-logs4.4541.55
Darujme /wp-admin/options-general.php?page=darujme_options4.5949.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Darujme
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.65 ▼0.7012.90 ▲11.0842.01 ▼1.21
Dashboard /wp-admin2,203 ▲235.59 ▼0.0889.28 ▼3.1042.14 ▲3.62
Posts /wp-admin/edit.php2,105 ▲22.01 ▼0.1440.33 ▲3.2234.42 ▲0.54
Add New Post /wp-admin/post-new.php6,201 ▲4,67519.46 ▼4.12860.51 ▲229.7635.15 ▼12.32
Media Library /wp-admin/upload.php1,405 ▲54.18 ▼0.0295.69 ▲1.8342.08 ▲1.40
WPify Logs /wp-admin/tools.php?page=wpify-logs7981.9921.6524.95
Darujme /wp-admin/options-general.php?page=darujme_options3,81423.96510.3952.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 271× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\PHPStan\\PhpDocParser\\Ast\\PhpDoc\\PhpDocTagValueNode' not found in wp-content/plugins/darujme/deps/phpstan/phpdoc-parser/src/Ast/PhpDoc/ReturnTagValueNode.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\Invoker\\ParameterResolver\\ParameterResolver' not found in wp-content/plugins/darujme/deps/php-di/invoker/src/ParameterResolver/Container/ParameterNameContainerResolver.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'DarujmeDeps\\Wpify\\Model\\Abstracts\\AbstractTermModel' not found in wp-content/plugins/darujme/deps/wpify/model/src/Menu.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'DarujmeDeps\\Wpify\\Model\\Abstracts\\AbstractOrderItemModel' not found in wp-content/plugins/darujme/deps/wpify/model/src/OrderItemLine.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\DI\\Factory\\RequestedEntry' not found in wp-content/plugins/darujme/deps/php-di/php-di/src/Definition/Definition.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\DI\\Definition\\Definition' not found in wp-content/plugins/darujme/deps/php-di/php-di/src/Definition/ValueDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/darujme/deps/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\PHPStan\\PhpDocParser\\Ast\\Type\\TypeNode' not found in wp-content/plugins/darujme/deps/phpstan/phpdoc-parser/src/Ast/Type/UnionTypeNode.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\DI\\Definition\\Definition' not found in wp-content/plugins/darujme/deps/php-di/php-di/src/Definition/EnvironmentVariableDefinition.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'DarujmeDeps\\DI\\Definition\\Definition' not found in wp-content/plugins/darujme/deps/php-di/php-di/src/Definition/ArrayDefinition.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 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
2 plugin tags: donation, darujme

darujme/darujme.php 85% from 13 tests

The entry point to "Darujme" version 1.1.6 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.5" instead of "5.4.0")
  • Requires PHP: Required version does not match the one declared in readme.txt ("7.4" instead of "7.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin25,978 lines of code in 469 files:
LanguageFilesBlank linesComment linesLines of code
PHP4161,06911,05921,998
Markdown2282002,167
JSON19001,425
JSX4340365
YAML11012
JavaScript4004
SVG1004
CSS2003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.43
▷ Minimum class complexity1.00
▷ Maximum class complexity318.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces67
Interfaces44
Traits6
Classes342
▷ Abstract classes267.60%
▷ Concrete classes31692.40%
▷ Final classes196.01%
Methods1,916
▷ Static methods1065.53%
▷ Public methods1,53880.27%
▷ Protected methods21411.17%
▷ Private methods1648.56%
Functions115
▷ Named functions2118.26%
▷ Anonymous functions9481.74%
Constants126
▷ Global constants53.97%
▷ Class constants12196.03%
▷ Public constants9175.21%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.23MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
deps/wpify/custom-fields/build/images/flags@2x.9d5328fb.png170.28KB68.04KB▼ 60.04%
deps/wpify/custom-fields/build/images/flags.007b2705.png69.20KB23.42KB▼ 66.16%