62% click-to-vote-me

Code Review | click-to-vote.me

WordPress plugin click-to-vote.me scored62%from 54 tests.

About plugin

  • Plugin page: click-to-vote-me
  • Plugin version: 21.3.13
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Mar 17, 2021
  • Number of updates: 8
  • Update frequency: every 0.1 days
  • Top authors: trollderiu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /513 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.94MB] [CPU: ▼37.82ms] Passed 4 tests

A check of server-side resources used by click-to-vote.me
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.77 ▲2.08
Dashboard /wp-admin3.00 ▼0.3024.57 ▼30.82
Posts /wp-admin/edit.php3.00 ▼0.3524.82 ▼22.52
Add New Post /wp-admin/post-new.php3.00 ▼2.8822.10 ▼89.19
Media Library /wp-admin/upload.php3.00 ▼0.2223.61 ▼8.74
click-to-vote.me /wp-admin/options-general.php?page=click-to-vote3.0122.60

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for click-to-vote.me
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.021.85 ▲0.0845.53 ▲5.48
Dashboard /wp-admin2,202 ▲255.57 ▼0.1089.11 ▼9.2444.34 ▲3.25
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0239.13 ▲3.9732.38 ▼8.53
Add New Post /wp-admin/post-new.php1,529 ▲323.58 ▼0.06681.95 ▲36.7156.87 ▲14.12
Media Library /wp-admin/upload.php1,404 ▲44.22 ▲0.06102.25 ▲5.5145.17 ▲3.56
click-to-vote.me /wp-admin/options-general.php?page=click-to-vote8241.9924.8122.62

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ClicktovoteSettings::add_options_menu() should not be called statically
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=click-to-vote
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ClicktovoteSettings::add_options_menu() should not be called statically
    • > GET request to /wp-admin/options-general.php?page=click-to-vote
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method ClicktovoteSettings::display_settings_page() should not be called statically

SRP 0% from 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/click-to-vote-me/templates/settings.php
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/click-to-vote-me/templates/settings.php on line 30
    • > PHP Notice
      Undefined variable: action in wp-content/plugins/click-to-vote-me/templates/settings.php on line 11
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/click-to-vote-me/templates/settings.php on line 19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-vote-me/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-vote-me/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-vote-me/settings.php:3
    • > PHP Notice
      Undefined variable: updated in wp-content/plugins/click-to-vote-me/templates/settings.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/click-to-vote-me/settings.php:3

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

click-to-vote-me/click-to-vote.php 92% from 13 tests

"click-to-vote.me" version 21.3.13'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 ("click-to-vote-me.php" instead of "click-to-vote.php")

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
Success! There were no dangerous files found in this plugin112 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP42111102
JSON10010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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.08MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
icon-128x128.png30.49KB5.69KB▼ 81.35%
icon-256x256.png50.30KB12.38KB▼ 75.40%