57% wp-open-votomat

Code Review | WP Open Votomat

WordPress plugin WP Open Votomat scored 57% from 54 tests.

About plugin

  • Plugin page: wp-open-votomat
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.2.3
  • WordPress version: 6.3.1
  • First release: Mar 19, 2019
  • Latest release: Sep 26, 2019
  • Number of updates: 21
  • Update frequency: every 9.3 days
  • Top authors: sebastiantiede (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 5,129 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.19MB] [CPU: ▼44.50ms] Passed 4 tests

Server-side resources used by WP Open Votomat
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.84 ▼39.56
Dashboard /wp-admin3.06 ▼0.2515.74 ▼31.43
Posts /wp-admin/edit.php3.06 ▼0.3017.43 ▼32.29
Add New Post /wp-admin/post-new.php3.06 ▼2.8316.81 ▼74.73
Media Library /wp-admin/upload.php3.06 ▼0.1716.06 ▼18.99
Parties /wp-admin/edit.php?post_type=wpov-party3.0617.54
Questions /wp-admin/edit.php?post_type=wpov-question3.0616.71
Dashboard /wp-admin/admin.php?page=wpov-dashboard3.0616.45
Votings /wp-admin/edit.php?post_type=wpov-voting3.0618.55
Settings /wp-admin/admin.php?page=wpov-settings3.0615.49

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 1,264 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WP Open Votomat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,870 ▲13513.88 ▼0.4717.01 ▲15.0830.65 ▼16.21
Dashboard /wp-admin2,254 ▲635.86 ▲0.99105.81 ▲4.5337.65 ▼5.11
Posts /wp-admin/edit.php2,143 ▲512.07 ▲0.0840.09 ▼3.7735.00 ▼2.00
Add New Post /wp-admin/post-new.php1,559 ▲2622.70 ▼0.55660.89 ▼16.8168.07 ▲19.06
Media Library /wp-admin/upload.php1,439 ▲514.30 ▲0.13105.63 ▼7.9047.51 ▼1.04
Parties /wp-admin/edit.php?post_type=wpov-party1,1462.0045.7629.73
Questions /wp-admin/edit.php?post_type=wpov-question1,1321.9632.9928.95
Dashboard /wp-admin/admin.php?page=wpov-dashboard8562.4132.1426.01
Votings /wp-admin/edit.php?post_type=wpov-voting1,1392.0533.9229.06
Settings /wp-admin/admin.php?page=wpov-settings2,2218.73168.1172.16

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/admin.php+314
    Undefined index: post_type
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpov-settings
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/admin.php+316
    Undefined index: post
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpov-settings
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/admin.php+314
    Undefined index: post_type
    • > GET request to /wp-admin/admin.php?page=wpov-dashboard
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method wpov_admin_options_dashboard::add_page() should not be called statically
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpov-voting
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/post_type-voting.php+135
    Undefined variable: fields
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=wpov-voting
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/post_type-voting.php+232
    Undefined variable: prefix
    • > GET request to /wp-admin/admin.php?page=wpov-settings
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/options.php+168
    Undefined property: wpov_admin_options_settings::$key
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpov-settings
    • > Notice in wp-content/plugins/wp-open-votomat/includes/admin/options.php+120
    Undefined index: key

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-open-votomat/wp-open-votomat.php
    • > /wp-content/plugins/wp-open-votomat/vendor/cmb2/apigen/hook-docs.php
  • 317× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/wp-open-votomat/vendor/cmb2/includes/types/CMB2_Type_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-open-votomat/vendor/cmb2/includes/helper-functions.php:131
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-open-votomat/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-open-votomat/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Asm89\\Twig\\CacheExtension\\Exception\\BaseException' not found in wp-content/plugins/wp-open-votomat/vendor/asm89/twig-cache-extension/lib/Asm89/Twig/CacheExtension/Exception/NonExistingStrategyException.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-open-votomat/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Timber\\User' not found in wp-content/plugins/wp-open-votomat/vendor/timber/timber/lib/Integrations/CoAuthorsPlusUser.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/wp-open-votomat/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/wp-open-votomat/vendor/twig/twig/src/Node/Expression/Binary/NotEqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-open-votomat/vendor/cmb2/init.php:126

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=wpov-settings
    • > Network (severe)
    wp-content/themes/twentytwentyone/css/theme_options.css - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
No plugin tags provided

wp-open-votomat/wp-open-votomat.php 92% from 13 tests

The main file in "WP Open Votomat" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • 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 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin113,276 lines of code in 1,051 files:
LanguageFilesBlank linesComment linesLines of code
PHP6118,28616,48134,250
PO File12114,45218,66832,665
JavaScript265,6865,38027,086
CSS201,9081,3909,847
JSON10004,531
Markdown2676502,224
Sass16300251,379
Twig20874762
SVG18400184
YAML9322183
XML72243156
reStructuredText1519

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces37
Interfaces19
Traits0
Classes583
▷ Abstract classes254.29%
▷ Concrete classes55895.71%
▷ Final classes498.78%
Methods2,242
▷ Static methods33014.72%
▷ Public methods1,88584.08%
▷ Protected methods26811.95%
▷ Private methods893.97%
Functions199
▷ Named functions16180.90%
▷ Anonymous functions3819.10%
Constants85
▷ Global constants1922.35%
▷ Class constants6677.65%
▷ Public constants66100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
34 compressed PNG files occupy 1.27MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/images/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/images/ui-icons_2e83ff_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
assets/screenshot-3.png102.32KB99.88KB▼ 2.39%
vendor/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%