74% poll-and-vote-system

Code Review | Poll And Vote System

WordPress plugin Poll And Vote System scored 74% from 54 tests.

About plugin

  • Plugin page: poll-and-vote-system
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Aug 24, 2022
  • Latest release: Aug 24, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: hasanazizul (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 176 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.42ms] Passed 4 tests

Server-side resources used by Poll And Vote System
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.45 ▼10.64
Dashboard /wp-admin3.35 ▲0.0446.41 ▲0.70
Posts /wp-admin/edit.php3.40 ▲0.0550.49 ▲0.64
Add New Post /wp-admin/post-new.php5.93 ▲0.0495.36 ▲3.84
Media Library /wp-admin/upload.php3.28 ▲0.0533.94 ▼0.38

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 36 new files
Database: 3 new tables, 6 new options
New tables
wp_pvs_votes
wp_pvs_answer
wp_pvs_question
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Poll And Vote System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,122 ▲37624.40 ▲9.6539.39 ▲37.6339.40 ▼7.13
Dashboard /wp-admin2,305 ▲11711.84 ▲6.02146.80 ▲45.4743.61 ▲2.30
Posts /wp-admin/edit.php2,208 ▲11910.70 ▲8.6985.15 ▲44.4434.38 ▼1.96
Add New Post /wp-admin/post-new.php6,423 ▲4,90220.35 ▼2.88774.08 ▲100.5737.25 ▼27.25
Media Library /wp-admin/upload.php1,504 ▲11310.99 ▲6.80142.21 ▲38.4842.26 ▼4.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_pvs_question
    • wp_pvs_votes
    • wp_pvs_answer
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

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)
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined property: stdClass::$prefix in wp-content/plugins/poll-and-vote-system/poll-and-vote-system.php on line 35
    • > PHP Warning
      Creating default object from empty value in wp-content/plugins/poll-and-vote-system/poll-and-vote-system.php on line 34
    • > PHP Notice
      Undefined property: stdClass::$prefix in wp-content/plugins/poll-and-vote-system/poll-and-vote-system.php on line 36
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/poll-and-vote-system/poll-and-vote-system.php on line 34

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Add poll through shortcode.), #2 (Preview block editor.), #3 (Add poll.), #4 (Poll Documentation.)
The official readme.txt is a good inspiration

poll-and-vote-system/poll-and-vote-system.php 92% from 13 tests

"Poll And Vote System" version 1.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:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected11,346 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,804509,962
PHP203066391,146
JavaScript52530237
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity7.50
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods63
▷ Static methods69.52%
▷ Public methods5892.06%
▷ Protected methods00.00%
▷ Private methods57.94%
Functions17
▷ Named functions1588.24%
▷ Anonymous functions211.76%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin