84% simple-vote

Code Review | Simple Vote – Share your Thought, By A Like/Dislike Vote!

WordPress plugin Simple Vote – Share your Thought, By A Like/Dislike Vote! scored84%from 54 tests.

About plugin

  • Plugin page: simple-vote
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 17, 2020
  • Latest release: Aug 10, 2023
  • Number of updates: 17
  • Update frequency: every 58.8 days
  • Top authors: PressTigers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /3,192 total downloads

Benchmarks

Plugin footprint 83% 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.21MB] [CPU: ▼1.34ms] Passed 4 tests

A check of server-side resources used by Simple Vote – Share your Thought, By A Like/Dislike Vote!
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2045.04 ▲0.33
Dashboard /wp-admin3.51 ▲0.2152.72 ▲0.31
Posts /wp-admin/edit.php3.63 ▲0.2752.59 ▲4.99
Add New Post /wp-admin/post-new.php6.12 ▲0.2490.89 ▼7.59
Media Library /wp-admin/upload.php3.44 ▲0.2137.59 ▲1.59

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 22 new options
New WordPress options
widget_recent-posts
db_upgraded
section_alignment
theysaidso_admin_options
alert_font_style
widget_theysaidso_widget
alert_font_weight
text_color
dislike_bg_color
post_titles
...

Browser metrics Passed 4 tests

A check of browser resources used by Simple Vote – Share your Thought, By A Like/Dislike Vote!
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,897 ▲13613.54 ▼0.839.44 ▲7.7142.95 ▲3.20
Dashboard /wp-admin2,215 ▲355.64 ▼0.0096.63 ▲5.9841.66 ▼4.22
Posts /wp-admin/edit.php2,120 ▲202.06 ▲0.0636.49 ▼2.1736.48 ▼3.17
Add New Post /wp-admin/post-new.php6,264 ▲4,73326.06 ▲2.89869.73 ▲256.5151.46 ▼1.66
Media Library /wp-admin/upload.php1,420 ▲204.30 ▲0.1594.72 ▼9.6141.88 ▼3.76

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 22 options
    • section_padding
    • widget_recent-posts
    • alert_font_family
    • alert_font_style
    • dislike_color
    • alert_font_weight
    • text_color
    • like_bg_color
    • section_bg_color
    • widget_recent-comments
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-vote/public/partials/simple-vote-public-display.php
    • > /wp-content/plugins/simple-vote/admin/partials/simple-vote-admin-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Donate link: Invalid url: "www.presstigers.com"
The official readme.txt might help

simple-vote/simple-vote.php Passed 13 tests

The primary PHP file in "Simple Vote – Share your Thought, By A Like/Dislike Vote!" version 1.0.2 is used by WordPress to initiate all plugin functionality
135 characters long description:
The simplest and easiest to use voting plugin that lets you add liking and disliking buttons under your content with just a few clicks.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected6,341 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS481132,885
SVG1002,671
PHP14264776695
JavaScript2201290

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity7.33
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods41
▷ Static methods24.88%
▷ Public methods3687.80%
▷ Protected methods00.00%
▷ Private methods512.20%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected