68% social-polls-by-opinionstage

Code Review | Poll, Survey & Quiz Maker Plugin by Opinion Stage

WordPress plugin Poll, Survey & Quiz Maker Plugin by Opinion Stage scored68%from 54 tests.

About plugin

  • Plugin page: social-polls-by-o...
  • Plugin version: 19.8.18
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 17, 2012
  • Latest release: Nov 1, 2023
  • Number of updates: 741
  • Update frequency: every 5.5 days
  • Top authors: kucaahbe (36.44%)assafp (29.42%)yoffegil (16.73%)opinionstage (10.8%)artemopinionstage (7.15%)

Code review

54 tests

User reviews

273 reviews

Install metrics

10,000+ active /1,204,148 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼7.19ms] Passed 4 tests

This is a short check of server-side resources used by Poll, Survey & Quiz Maker Plugin by Opinion Stage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1737.61 ▼5.01
Dashboard /wp-admin3.48 ▲0.1349.08 ▼12.66
Posts /wp-admin/edit.php3.59 ▲0.2345.07 ▼1.36
Add New Post /wp-admin/post-new.php6.10 ▲0.2187.84 ▼9.74
Media Library /wp-admin/upload.php3.40 ▲0.1740.79 ▲4.24
/wp-admin/admin.php?page=opinionstage-disconnect-page3.2828.54
/wp-admin/admin.php?page=opinionstage-login-callback3.2641.24

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Poll, Survey & Quiz Maker Plugin by Opinion Stage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲15013.43 ▼0.928.41 ▲6.6537.40 ▼6.27
Dashboard /wp-admin2,224 ▲465.51 ▼0.1589.13 ▼26.6765.47 ▲23.46
Posts /wp-admin/edit.php2,129 ▲291.99 ▲0.0134.49 ▲1.5529.20 ▼9.71
Add New Post /wp-admin/post-new.php6,658 ▲5,13219.40 ▼3.41949.12 ▲199.5361.28 ▲2.28
Media Library /wp-admin/upload.php1,426 ▲264.12 ▼0.10112.26 ▲7.7877.38 ▲31.81
/wp-admin/admin.php?page=opinionstage-disconnect-page280.420.073.52
/wp-admin/admin.php?page=opinionstage-login-callback280.420.063.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Incomplete uninstall procedure, leaving 135 files (2.20MB) in the plugin directory
    • (new file) Makefile
    • (new file) admin/content-popup-button.php
    • (new file) admin/css/fonts/os-icon-font.eot
    • (new file) admin/content-popup-template.html.php
    • (new file) admin/css/admin-feedback.css
    • (new file) admin/content-popup.php
    • (new file) admin/css/fonts/os-icon-font.svg
    • (new file) admin/admin-page-loader.php
    • (new file) .gitattributes
    • (new file) .gitignore
    • ...
  • This plugin does not fully uninstall, leaving 8 options in the database
    • opinionstage_widget
    • widget_opinionstage_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Please take a closer look at the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/social-polls-by-opinionstage/admin/template-parts/vue/create-screen.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/social-polls-by-opinionstage/admin/template-parts/header-logo-line-logout-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/social-polls-by-opinionstage/admin/template-parts/signup-form.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/social-polls-by-opinionstage/admin/template-parts/vue/widget-list.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/social-polls-by-opinionstage/admin/template-parts/widget-form.php:62
    • > PHP Notice
      Undefined variable: os_client_logged_in in wp-content/plugins/social-polls-by-opinionstage/admin/template-parts/widget-form.php on line 10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=opinionstage-disconnect-page
    • > Network (severe)
    wp-admin/admin.php?page=opinionstage-disconnect-page - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=opinionstage-login-callback
    • > Network (severe)
    wp-admin/admin.php?page=opinionstage-settings - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: survey, poll plugin, quiz plugin, poll, survey plugin...

social-polls-by-opinionstage/plugin.php 85% from 13 tests

This is the main PHP file of "Poll, Survey & Quiz Maker Plugin by Opinion Stage" version 19.8.18, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("social-polls-by-opinionstage.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin35,361 lines of code in 90 files:
LanguageFilesBlank linesComment linesLines of code
JSON60029,305
PHP445481,1412,450
Sass9282122,208
JavaScript22172331,219
SVG400166
make1409
CSS4104

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.62
▷ Minimum class complexity2.00
▷ Maximum class complexity35.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods100
▷ Static methods44.00%
▷ Public methods8181.00%
▷ Protected methods99.00%
▷ Private methods1010.00%
Functions65
▷ Named functions6498.46%
▷ Anonymous functions11.54%
Constants31
▷ Global constants31100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
36 PNG files occupy 0.41MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/slideshow@3x.png3.60KB2.01KB▼ 44.16%
admin/images/welcome-to-opinionstage.png109.29KB120.60KB0.00%
admin/images/top-bg.png195.15KB93.83KB▼ 51.92%
admin/images/logos/bbdo.png0.66KB0.69KB0.00%
admin/images/logos/wb.png0.87KB0.91KB0.00%