79% easy-wp-voting-with-payment

Code Review | Easy WP Voting With Payment

WordPress plugin Easy WP Voting With Payment scored79%from 54 tests.

About plugin

  • Plugin page: easy-wp-voting-wi...
  • Plugin version: 2.4.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Aug 28, 2021
  • Number of updates: 12
  • Update frequency: every 27.2 days
  • Top authors: mujhtech222 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,201 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼6.38ms] Passed 4 tests

Server-side resources used by Easy WP Voting With Payment
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1645.89 ▲3.14
Dashboard /wp-admin3.50 ▲0.2047.12 ▼1.71
Posts /wp-admin/edit.php3.60 ▲0.2447.58 ▼1.06
Add New Post /wp-admin/post-new.php6.20 ▲0.3178.82 ▼25.90
Media Library /wp-admin/upload.php3.44 ▲0.2135.24 ▲3.85
All Candidate /wp-admin/edit.php?post_type=ewvwp3.4437.42
Settings /wp-admin/edit.php?post_type=ewvwp&page=ewvwp_plugin3.3635.69
Contest Categories /wp-admin/edit-tags.php?taxonomy=ewvwp-category&post_type=ewvwp3.4033.94
Add Candidate /wp-admin/post-new.php?post_type=ewvwp3.5649.32

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Easy WP Voting With Payment: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,034 ▲29914.13 ▼0.2516.90 ▲15.0538.85 ▼12.85
Dashboard /wp-admin2,248 ▲604.87 ▼0.96108.73 ▲3.7838.16 ▼3.77
Posts /wp-admin/edit.php2,131 ▲392.00 ▼0.0146.31 ▲5.4642.15 ▲0.72
Add New Post /wp-admin/post-new.php1,574 ▲3218.33 ▼0.09625.39 ▲2.7149.92 ▼14.37
Media Library /wp-admin/upload.php1,427 ▲454.32 ▲0.1397.96 ▲0.0743.26 ▼0.36
All Candidate /wp-admin/edit.php?post_type=ewvwp1,1151.9333.9228.39
Settings /wp-admin/edit.php?post_type=ewvwp&page=ewvwp_plugin8972.0624.5027.96
Contest Categories /wp-admin/edit-tags.php?taxonomy=ewvwp-category&post_type=ewvwp1,2842.1427.1727.34
Add Candidate /wp-admin/post-new.php?post_type=ewvwp1,9523.7462.4133.77

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-wp-voting-with-payment/easy-wp-voting-with-payment.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/easy-wp-voting-with-payment/templates/pages/theme_1.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/easy-wp-voting-with-payment/templates/pages/theme_1.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/easy-wp-voting-with-payment/templates/pages/theme_2.php:163
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-wp-voting-with-payment/functions.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/easy-wp-voting-with-payment/templates/easy-wp-voting.php:23
    • > PHP Notice
      Undefined variable: contest in wp-content/plugins/easy-wp-voting-with-payment/templates/easy-wp-voting.php on line 10
    • > PHP Notice
      Undefined variable: contest in wp-content/plugins/easy-wp-voting-with-payment/templates/easy-wp-voting.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/easy-wp-voting-with-payment/ajax.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/easy-wp-voting-with-payment/templates/admin.php:1
    • > PHP Notice
      Undefined variable: loop in wp-content/plugins/easy-wp-voting-with-payment/templates/pages/theme_2.php on line 163

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 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
6 plugin tags: payment, paystack, mastercard, visa, vote...

easy-wp-voting-with-payment/easy-wp-voting-with-payment.php Passed 13 tests

"Easy WP Voting With Payment" version 2.4.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
91 characters long description:
Easy WP Voting With Payment allows you to create a simple voting system with payment method

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected2,732 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
CSS2881,042
PHP927763872
JavaScript3243205818

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions37
▷ Named functions37100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.26MB with 0.17MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshot-1.png23.63KB9.15KB▼ 61.26%
assets/images/screenshot-2.png242.14KB69.79KB▼ 71.18%