68% easy-vote

Code Review | Easy Vote

WordPress plugin Easy Vote scored68%from 54 tests.

About plugin

  • Plugin page: easy-vote
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Jun 6, 2020
  • Latest release: Aug 24, 2021
  • Number of updates: 4
  • Update frequency: every 112.0 days
  • Top authors: madejskiproject (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /507 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: ▲0.01MB] [CPU: ▼7.94ms] Passed 4 tests

Server-side resources used by Easy Vote
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.96 ▼0.67
Dashboard /wp-admin3.32 ▲0.0248.08 ▼4.18
Posts /wp-admin/edit.php3.37 ▲0.0150.63 ▼0.17
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.52 ▼20.56
Media Library /wp-admin/upload.php3.24 ▲0.0134.50 ▼6.36

Server storage [IO: ▲0.45MB] [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: 20 new files
Database: 2 new tables, 7 new options
New tables
wp_easy_vote_ranking
wp_easy_vote_forms
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
evmp_db_version

Browser metrics Passed 4 tests

Easy Vote: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲4513.28 ▼1.034.84 ▲2.5936.91 ▼7.69
Dashboard /wp-admin2,215 ▲335.86 ▼0.0396.06 ▼10.1637.39 ▼2.80
Posts /wp-admin/edit.php2,104 ▲152.01 ▲0.0038.21 ▼2.6132.65 ▼3.38
Add New Post /wp-admin/post-new.php1,524 ▼417.67 ▼0.65665.84 ▲52.1955.61 ▼5.50
Media Library /wp-admin/upload.php1,400 ▲124.23 ▲0.0599.88 ▼0.8143.35 ▼0.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_easy_vote_forms
    • wp_easy_vote_ranking
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • evmp_db_version
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-vote/public/easy-vote.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-vote/admin/easy-vote.php:22
    • > PHP Notice
      Undefined index: tab in wp-content/plugins/easy-vote/admin/easy-vote.php on line 12

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 93% 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
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2 in easy-vote/assets to your readme.txt
The official readme.txt is a good inspiration

easy-vote/easy-vote.php 92% from 13 tests

This is the main PHP file of "Easy Vote" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 340 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected6,048 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
SVG1015,534
PHP10155437513
CSS1111

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin