72% wplo-survey

Code Review | WPLO Survey

WordPress plugin WPLO Survey scored72%from 54 tests.

About plugin

  • Plugin page: wplo-survey
  • Plugin version: 2.5.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 24, 2019
  • Latest release: Jun 8, 2021
  • Number of updates: 41
  • Update frequency: every 17.5 days
  • Top authors: edgewebapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,009 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.33ms] Passed 4 tests

This is a short check of server-side resources used by WPLO Survey
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.97 ▼0.02
Dashboard /wp-admin3.35 ▲0.0552.66 ▼3.29
Posts /wp-admin/edit.php3.40 ▲0.0546.49 ▲0.13
Add New Post /wp-admin/post-new.php6.00 ▲0.1190.66 ▼4.73
Media Library /wp-admin/upload.php3.27 ▲0.0535.06 ▼1.27
Plugin Setup /wp-admin/edit.php?post_type=survey&page=WPLOSURVEY-options3.2536.57
Add New /wp-admin/post-new.php?post_type=survey3.1839.20
WPLO Survey /wp-admin/edit.php?post_type=survey3.3247.74
LO Survey List /wp-admin/edit.php?post_type=survey&page=WPLOSURVEY-list3.2235.65

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 70 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WPLO Survey
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲6614.35 ▼0.051.64 ▼0.1144.56 ▼1.18
Dashboard /wp-admin2,230 ▲535.62 ▼0.0195.97 ▼3.4743.72 ▼6.15
Posts /wp-admin/edit.php2,135 ▲352.08 ▲0.0736.58 ▲0.0733.23 ▼5.29
Add New Post /wp-admin/post-new.php1,564 ▲3818.39 ▼4.85636.10 ▼50.9361.44 ▲15.79
Media Library /wp-admin/upload.php1,435 ▲324.21 ▲0.0297.94 ▼38.4444.57 ▼11.33
Plugin Setup /wp-admin/edit.php?post_type=survey&page=WPLOSURVEY-options8852.1136.3527.45
Add New /wp-admin/post-new.php?post_type=survey4,0169.78273.08149.15
WPLO Survey /wp-admin/edit.php?post_type=survey1,1992.2837.8028.43
LO Survey List /wp-admin/edit.php?post_type=survey&page=WPLOSURVEY-list8402.0827.5927.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=survey
    • > Notice in wp-content/plugins/wplo-survey/wplo-survey.php+987
    Undefined index: WPLOSURVEY_loopCount
  • 22 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=survey
    • > Notice in wp-content/plugins/wplo-survey/wplo-survey.php+1107
    Undefined index: WPLOSURVEY_subloopMaxCount
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=survey&page=WPLOSURVEY-list
    • > Notice in wp-content/plugins/wplo-survey/cnct-set.php+9
    Undefined index: HTTP_REFERER

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wplo-survey/beaver-wplo-survey-module/includes/frontend.php
    • > /wp-content/plugins/wplo-survey/meta-survey-box-survey-inputs-inc.php
    • > /wp-content/plugins/wplo-survey/single-survey-form.php
    • > /wp-content/plugins/wplo-survey/svprocess-inc.php
    • > /wp-content/plugins/wplo-survey/cnct-set.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/wplo-survey/beaver-wplo-survey-module/beaver-wplo-survey-module.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPLOSURVEY_NS\\plugin_dir_path() in wp-content/plugins/wplo-survey/wplo-survey.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Requires at least: Version format is invalid
  • Screenshots: A description for screenshot #7 is required in wplo-survey/assets to your readme.txt
Please take inspiration from this readme.txt

wplo-survey/wplo-survey.php Passed 13 tests

The primary PHP file in "WPLO Survey" version 2.5.1 is used by WordPress to initiate all plugin functionality
132 characters long description:
Connect Luminate Online surveys to WordPress without having to code- just enter the survey id and the plugin takes care of the rest.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected30,527 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
CSS82,3548115,683
SVG4009,556
PHP71,0101,0693,282
Sass3204301,893
JavaScript113645113

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods116.67%
▷ Public methods583.33%
▷ Protected methods00.00%
▷ Private methods116.67%
Functions41
▷ Named functions3995.12%
▷ Anonymous functions24.88%
Constants3
▷ Global constants3100.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
22 PNG files occupy 0.21MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/gtm_variable_ua.png91.27KB43.07KB▼ 52.81%
assets/css/images/ui-icons_444444_256x240.png3.19KB3.49KB0.00%
assets/css/images/ui-bg_glass_75_dadada_1x400.png0.29KB0.16KB▼ 46.84%
assets/css/images/ui-bg_flat_0_aaaaaa_40x100.png0.08KB0.08KB0.00%
assets/images/survey_id.png1.78KB1.23KB▼ 30.87%