10% wp-custom-voting

Code Review | WP Custom Voting

WordPress plugin WP Custom Voting scored 10% from 54 tests.

About plugin

  • Plugin page: wp-custom-voting
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-3.5.1
  • WordPress version: 6.3.1
  • First release: Feb 4, 2013
  • Latest release: Feb 4, 2013
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: dmitritechs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 4,753 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/wp-custom-voting/wp_customvote.php+140
    Undefined index: process_wpcv

Server metrics [RAM: ▼1.96MB] [CPU: ▼53.54ms] Passed 4 tests

Analyzing server-side resources used by WP Custom Voting
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.436.03 ▼35.55
Dashboard /wp-admin2.05 ▼1.265.95 ▼42.62
Posts /wp-admin/edit.php2.05 ▼1.315.30 ▼45.85
Add New Post /wp-admin/post-new.php2.05 ▼3.845.31 ▼90.12
Media Library /wp-admin/upload.php2.05 ▼1.185.54 ▼29.82

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP Custom Voting
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22113.66 ▼0.639.50 ▲7.7641.93 ▼1.22
Dashboard /wp-admin2,220 ▲295.82 ▲0.0093.31 ▼7.1371.04 ▲28.78
Posts /wp-admin/edit.php2,109 ▲171.98 ▼0.1533.84 ▼9.4329.09 ▼6.45
Add New Post /wp-admin/post-new.php1,683 ▲16922.74 ▲4.96756.27 ▲73.3353.09 ▼5.37
Media Library /wp-admin/upload.php1,396 ▲84.22 ▼0.0996.18 ▼16.2771.00 ▲24.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/wp-custom-voting/wp_customvote.php+140
    Undefined index: process_wpcv
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • 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
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/wp-custom-voting/wp_customvote.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add an image for screenshot #4 (screenshot-2.png Example of Frontend view.)
  • Screenshots: Please describe screenshot #2 in wp-custom-voting/assets to your readme.txt
The official readme.txt might help

wp-custom-voting/wp_customvote.php 85% from 13 tests

"WP Custom Voting" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-custom-voting.php" instead of "wp_customvote.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 449 characters long)

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
No dangerous file extensions were detected355 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP13919282
CSS20251
JavaScript20022

PHP code Passed 2 tests

This is a short overview 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.33
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
6 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons.png5.33KB1.80KB▼ 66.20%
screenshot-1.png75.09KB31.31KB▼ 58.30%
images/dmitri-logo.png8.50KB3.31KB▼ 61.05%
screenshot-2.png29.92KB14.04KB▼ 53.06%
images/icon.png3.44KB0.83KB▼ 75.87%