10% simple-vote-me

Code Review | Simple Vote Me

WordPress plugin Simple Vote Me scored10%from 54 tests.

About plugin

  • Plugin page: simple-vote-me
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 13, 2014
  • Latest release: Sep 16, 2016
  • Number of updates: 14
  • Update frequency: every 48.1 days
  • Top authors: Borra (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /2,783 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/simple-vote-me/widget.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; GTSimpleVoteMeTopVotedWidget has a deprecated constructor

Server metrics [RAM: ▼1.80MB] [CPU: ▼64.15ms] Passed 4 tests

A check of server-side resources used by Simple Vote Me
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.275.83 ▼39.62
Dashboard /wp-admin2.26 ▼1.138.68 ▼63.10
Posts /wp-admin/edit.php2.26 ▼1.148.98 ▼53.15
Add New Post /wp-admin/post-new.php2.26 ▼3.678.42 ▼100.73
Media Library /wp-admin/upload.php2.26 ▼1.018.01 ▼31.49
Simple Vote Me /wp-admin/options-general.php?page=simple-vote-me/admin.php2.268.63

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_gtsimplevotemetopvotedwidget
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
gt_simplevoteme_version
db_upgraded
widget_gtsimplevotemedwidget

Browser metrics Passed 4 tests

Checking browser requirements for Simple Vote Me
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲15813.42 ▼0.948.56 ▲6.6840.04 ▼3.96
Dashboard /wp-admin2,199 ▲195.61 ▼0.0490.37 ▼2.4541.96 ▼1.97
Posts /wp-admin/edit.php2,104 ▲41.94 ▼0.0138.29 ▲0.1133.19 ▼0.97
Add New Post /wp-admin/post-new.php1,529 ▲323.94 ▲0.15697.52 ▼6.9054.71 ▼0.17
Media Library /wp-admin/upload.php1,401 ▲14.21 ▲0.01101.44 ▼15.5044.78 ▼4.05
Simple Vote Me /wp-admin/options-general.php?page=simple-vote-me/admin.php1,2642.1354.3129.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/simple-vote-me/widget.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; GTSimpleVoteMeTopVotedWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_gtsimplevotemetopvotedwidget
    • db_upgraded
    • widget_gtsimplevotemedwidget
    • widget_recent-comments
    • widget_theysaidso_widget
    • gt_simplevoteme_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Deprecated in wp-content/plugins/simple-vote-me/widget.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; GTSimpleVoteMeTopVotedWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Deprecated in wp-content/plugins/simple-vote-me/widget.php+106
    Methods with the same name as their class will not be constructors in a future version of PHP; GTSimpleVoteMeWidget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Notice in wp-content/plugins/simple-vote-me/simple-vote-me.php+36
    Undefined variable: gt_simplevoteme_version
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in GTSimpleVoteMeTopVotedWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in GTSimpleVoteMeWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Warning in wp-content/plugins/simple-vote-me/admin.php+136
    in_array() expects parameter 2 to be array, bool given
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
  • 13 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Warning in wp-content/plugins/easy-age-verifier/lib/extras/wpApi.php+48
    file_get_contents(http://www.fillyourtaproom.com/wp-json/wp/v2/posts?per_page=10): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known

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 take a closer look at the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/simple-vote-me/simple-vote-me.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-vote-me/widget.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-vote-me/admin.php:3
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-vote-me/simple-vote-me.php on line 11

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=simple-vote-me%2Fadmin.php 316 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=simple-vote-me%2Fadmin.php 328 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=simple-vote-me/admin.php
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=simple-vote-me%2Fadmin.php 340 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% 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
These attributes need your attention:
  • Contributors: Plugin contributors not specified
  • Contributors: No valid plugin tags found
Please take inspiration from this readme.txt

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

The entry point to "Simple Vote Me" version 1.3.1 is a PHP file that has certain tags in its header comment area
57 characters long description:
This plugin add cute and simple votes for Wordpress post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin834 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP319247770
CSS14144
JavaScript13020

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity3.00
▷ Minimum class complexity2.00
▷ Maximum class complexity4.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/good.png2.87KB1.69KB▼ 41.06%
img/neutral.png1.97KB1.34KB▼ 31.95%
img/bad.png3.62KB1.83KB▼ 49.42%