90% simple-voting

Code Review | Simple voting

WordPress plugin Simple voting scored90%from 54 tests.

About plugin

  • Plugin page: simple-voting
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2015
  • Latest release: Apr 4, 2015
  • Number of updates: 21
  • Update frequency: every 0.5 days
  • Top authors: seoringer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,979 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.64ms] Passed 4 tests

An overview of server-side resources used by Simple voting
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0644.00 ▼1.72
Dashboard /wp-admin3.40 ▲0.0650.76 ▼1.74
Posts /wp-admin/edit.php3.52 ▲0.1248.80 ▼3.78
Add New Post /wp-admin/post-new.php5.99 ▲0.0690.36 ▼19.31
Media Library /wp-admin/upload.php3.33 ▲0.0638.37 ▲0.85

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Simple voting
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.74 ▲0.091.68 ▼0.1542.92 ▼0.59
Dashboard /wp-admin2,195 ▲185.51 ▼0.1084.06 ▼5.4136.66 ▼5.08
Posts /wp-admin/edit.php2,100 ▼01.94 ▼0.0135.08 ▼6.3032.56 ▼3.47
Add New Post /wp-admin/post-new.php1,536 ▼123.33 ▲4.97671.87 ▼9.8357.86 ▼5.12
Media Library /wp-admin/upload.php1,403 ▲64.22 ▲0.07102.30 ▲2.0546.59 ▲2.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === simple-voting === )
Please take inspiration from this readme.txt

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

The primary PHP file in "Simple voting" version 1.0.0 is used by WordPress to initiate all plugin functionality
108 characters long description:
Simple voting and rating system. In simplest case you just need to insert in your text one word: `[voting]`.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected823 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10191483539
JavaScript1359118
CSS11521106
PO File2121260

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity7.00
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods43
▷ Static methods24.65%
▷ Public methods3683.72%
▷ Protected methods00.00%
▷ Private methods716.28%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/user.png0.50KB0.50KB0.00%
images/mail.png0.42KB0.43KB0.00%
images/comments.png0.58KB0.59KB0.00%