77% surveyanyplace

Code Review | Survey Anyplace

WordPress plugin Survey Anyplace scored77%from 54 tests.

About plugin

  • Plugin page: surveyanyplace
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.1.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Dec 22, 2017
  • Latest release: Dec 28, 2017
  • Number of updates: 36
  • Update frequency: every 0.4 days
  • Top authors: sdebois (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,218 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Survey Anyplace
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0640.30 ▼1.24
Dashboard /wp-admin3.36 ▲0.0150.95 ▼15.35
Posts /wp-admin/edit.php3.41 ▲0.0550.76 ▲0.88
Add New Post /wp-admin/post-new.php5.96 ▲0.0895.56 ▼10.22
Media Library /wp-admin/upload.php3.28 ▲0.0535.32 ▼0.90

Server storage [IO: ▲0.32MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/surveyanyplace/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_surveyanyplace_embed
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Survey Anyplace
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11113.65 ▼0.492.07 ▲0.2644.58 ▲2.08
Dashboard /wp-admin2,236 ▲334.85 ▼0.0298.71 ▼12.6840.17 ▼7.23
Posts /wp-admin/edit.php2,115 ▲152.00 ▼0.0239.98 ▲1.8535.76 ▲0.51
Add New Post /wp-admin/post-new.php1,551 ▲2023.51 ▲0.41654.10 ▼28.1064.44 ▲3.48
Media Library /wp-admin/upload.php1,415 ▲154.21 ▼0.01109.92 ▲7.2543.48 ▼2.02

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_surveyanyplace_embed
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/surveyanyplace/resources/library/scripts.php
    • > /wp-content/plugins/surveyanyplace/resources/templates/surveyanyplace.php
    • > /wp-content/plugins/surveyanyplace/resources/library/display_added_survey.php
    • > /wp-content/plugins/surveyanyplace/index.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surveyanyplace/resources/library/surveyanyplace-functions.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/surveyanyplace/resources/library/surveyanyplace-widgets.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/surveyanyplace/resources/library/surveyanyplace-shortcodes.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/surveyanyplace/resources/library/surveyanyplace-vc.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5 in surveyanyplace/assets to your readme.txt
  • Tags: There are too many tags (16 tag instead of maximum 10)
You can look at the official readme.txt

surveyanyplace/index.php 92% from 13 tests

Analyzing the main PHP file in "Survey Anyplace" version 1.0.0
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("surveyanyplace.php" instead of "index.php")

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 plugin887 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP86265491
JavaScript100393
CSS3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity7.25
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions1191.67%
▷ Anonymous functions18.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
14 PNG files occupy 0.09MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public_html/images/background_banner.png11.87KB4.84KB▼ 59.22%
public_html/images/wrapper_logo2.png3.12KB2.41KB▼ 22.94%
public_html/images/button.png0.31KB0.24KB▼ 22.15%
public_html/images/logo-options.png2.01KB1.50KB▼ 25.27%
public_html/images/background.png32.69KB14.17KB▼ 56.66%