78% popup-surveys

Code Review | Popup Surveys & Polls for Wordpress (Mare.io)

WordPress plugin Popup Surveys & Polls for Wordpress (Mare.io) scored78%from 54 tests.

About plugin

  • Plugin page: popup-surveys
  • Plugin version: 1.36
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 6, 2015
  • Latest release: Nov 1, 2016
  • Number of updates: 96
  • Update frequency: every 4.7 days
  • Top authors: dusthazard (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

100+ active /17,873 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.45ms] Passed 4 tests

A check of server-side resources used by Popup Surveys & Polls for Wordpress (Mare.io)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.49 ▲3.99
Dashboard /wp-admin3.35 ▲0.0549.86 ▼2.94
Posts /wp-admin/edit.php3.40 ▲0.0451.56 ▼7.20
Add New Post /wp-admin/post-new.php5.93 ▲0.0485.64 ▼12.48
Media Library /wp-admin/upload.php3.27 ▲0.0437.03 ▲0.84

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Popup Surveys & Polls for Wordpress (Mare.io)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲6213.26 ▼1.032.28 ▲0.3041.53 ▼3.32
Dashboard /wp-admin2,253 ▲505.88 ▲0.7996.76 ▼19.1340.32 ▼3.75
Posts /wp-admin/edit.php2,133 ▲332.01 ▼0.0335.84 ▼2.3035.65 ▲1.95
Add New Post /wp-admin/post-new.php1,552 ▲2617.47 ▼0.23664.11 ▼27.8974.14 ▲12.19
Media Library /wp-admin/upload.php1,426 ▲234.27 ▲0.07103.57 ▼1.3448.26 ▲0.07

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/popup-surveys/includes/scripts-styles.php
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_ssl() in wp-content/plugins/popup-surveys/includes/functions.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popup-surveys/includes/optionspage.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/popup-surveys/includes/optionspage.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/popup-surveys/includes/views/main-options-page.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Too many tags (54 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

popup-surveys/wpsurvey.php 85% from 13 tests

This is the main PHP file of "Popup Surveys & Polls for Wordpress (Mare.io)" version 1.36, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("popup-surveys.php" instead of "wpsurvey.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 145 characters long)

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 plugin887 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP71,08552504
JavaScript555623381
CSS2042

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions14
▷ Named functions14100.00%
▷ Anonymous functions00.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
PNG images were not found in this plugin