87% setka-workflow

Code Review | Setka Workflow — manage the editorial process, track content production

WordPress plugin Setka Workflow — manage the editorial process, track content production scored 87% from 54 tests.

About plugin

  • Plugin page: setka-workflow
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.1.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 5.8.1
  • First release: Nov 30, 2017
  • Latest release: Sep 1, 2020
  • Number of updates: 54
  • Update frequency: every 18.7 days
  • Top authors: setka (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,207 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 gracefully, with no errors

Server metrics [RAM: ▲4.05MB] [CPU: ▼125.35ms] 75% from 4 tests

An overview of server-side resources used by Setka Workflow — manage the editorial process, track content production
The following require your attention
  • RAM: Try to keep total memory usage under 10MB (currently 13.81MB on /wp-admin/options-general.php?page=setka-workflow)
PageMemory (MB)CPU Time (ms)
Home /4.65 ▲1.9345.77 ▲22.90
Dashboard /wp-admin7.82 ▲4.7682.15 ▲34.04
Posts /wp-admin/edit.php7.87 ▲4.7676.03 ▲28.12
Add New Post /wp-admin/post-new.php10.34 ▲4.9089.81 ▼572.49
Media Library /wp-admin/upload.php7.76 ▲4.7561.75 ▲20.07
Setka Workflow /wp-admin/options-general.php?page=setka-workflow13.81116.44

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 3,870 new files
Database: no new tables, 1 new option
New WordPress options
setka_workflow_auto_created_posts_author_id

Browser metrics Passed 4 tests

This is an overview of browser requirements for Setka Workflow — manage the editorial process, track content production
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,742 ▲14616.15 ▲0.659.75 ▼1.1350.60 ▼3.47
Dashboard /wp-admin3,000 ▲666.96 ▲1.04147.67 ▼14.07122.24 ▲3.29
Posts /wp-admin/edit.php2,772 ▲333.04 ▲0.3675.91 ▲9.63111.60 ▲22.34
Add New Post /wp-admin/post-new.php1,558 ▼3318.19 ▼0.59385.91 ▲1.86141.69 ▲27.39
Media Library /wp-admin/upload.php1,834 ▲275.41 ▲0.41139.04 ▼17.49129.14 ▲1.46
Setka Workflow /wp-admin/options-general.php?page=setka-workflow1,1532.5962.5486.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/setka-workflow/vendor/symfony/mime/Resources/bin/update_mime_types.php
    • > /wp-content/plugins/setka-workflow/vendor/symfony/intl/Resources/bin/update-data.php
  • 1463× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/setka-workflow/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Zend\\Code\\Generator\\AbstractGenerator' not found in wp-content/plugins/setka-workflow/vendor/zendframework/zend-code/src/Generator/DocBlock/Tag/LicenseTag.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/setka-workflow/vendor/twig/twig/src/Node/Expression/Binary/EndsWithBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'ProxyManager\\Generator\\MethodGenerator' not found in wp-content/plugins/setka-workflow/vendor/ocramius/proxy-manager/src/ProxyManager/ProxyGenerator/AccessInterceptorScopeLocalizer/MethodGenerator/StaticProxyConstructor.php:33
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\StreamHandler' not found in wp-content/plugins/setka-workflow/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Korobochkin\\WPKit\\Runners\\AbstractRunner' not found in wp-content/plugins/setka-workflow/source/Admin/MetaBoxes/MetaBoxesRunner.php:9
    • > PHP Warning
      require_once(lib/byte_safe_strings.php): failed to open stream: No such file or directory in wp-content/plugins/setka-workflow/vendor/paragonie/random_compat/psalm-autoload.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Zend\\EventManager\\EventsCapableInterface' not found in wp-content/plugins/setka-workflow/vendor/zendframework/zend-eventmanager/src/EventManagerAwareInterface.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface' not found in wp-content/plugins/setka-workflow/vendor/symfony/validator/Violation/ConstraintViolationBuilder.php:28
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Form\\Extension\\Validator\\ViolationMapper\\ViolationMapperInterface' not found in wp-content/plugins/setka-workflow/vendor/symfony/form/Extension/Validator/ViolationMapper/ViolationMapper.php:25

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

setka-workflow/plugin.php 85% from 13 tests

"Setka Workflow — manage the editorial process, track content production" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("setka-workflow.php" instead of "plugin.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected515,233 lines of code in 3,698 files:
LanguageFilesBlank linesComment linesLines of code
JSON1,15700336,672
PHP2,20229,16869,813137,826
XML10418119,859
Markdown792,49507,863
JavaScript111,2483584,782
reStructuredText1042,4542,4042,930
CSS8341332,214
Twig19219591,867
XSD2451420
SVG1215329
Bourne Shell64012230
PO File14665151
Sass110060
Bourne Again Shell12011
Dockerfile18010
make1409

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity8.03
▷ Minimum class complexity1.00
▷ Maximum class complexity531.00
Average method complexity2.79
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces310
Interfaces256
Traits71
Classes1,843
▷ Abstract classes1095.91%
▷ Concrete classes1,73494.09%
▷ Final classes1528.77%
Methods8,937
▷ Static methods6196.93%
▷ Public methods7,45783.44%
▷ Protected methods6807.61%
▷ Private methods8008.95%
Functions635
▷ Named functions22535.43%
▷ Anonymous functions41064.57%
Constants855
▷ Global constants526.08%
▷ Class constants80393.92%
▷ Public constants77196.01%

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.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/ocramius/proxy-manager/doc-template/img/enf.png3.65KB3.65KB0.00%
vendor/ocramius/proxy-manager/doc-template/img/block.png2.32KB1.58KB▼ 31.82%