84% wpsurveys

Code Review | WPSurveys

WordPress plugin WPSurveys scored84%from 54 tests.

About plugin

  • Plugin page: wpsurveys
  • Plugin version: 0.2.8.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2019
  • Latest release: Dec 24, 2022
  • Number of updates: 15
  • Update frequency: every 83.3 days
  • Top authors: malexyoung (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.07MB] [CPU: ▼8.09ms] Passed 4 tests

Server-side resources used by WPSurveys
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0545.09 ▲1.61
Dashboard /wp-admin3.34 ▲0.0448.27 ▼4.86
Posts /wp-admin/edit.php3.46 ▲0.1046.30 ▼1.91
Add New Post /wp-admin/post-new.php5.50 ▼0.3977.34 ▼23.66
Media Library /wp-admin/upload.php3.26 ▲0.0431.43 ▼1.94

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 89 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
recovery_mode_email_last_sent
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

WPSurveys: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,455 ▼30612.25 ▼1.990.97 ▼0.6350.61 ▲6.28
Dashboard /wp-admin1,845 ▼3261.36 ▼4.2513.32 ▼88.7844.89 ▲2.30
Posts /wp-admin/edit.php1,998 ▼1021.33 ▼0.688.17 ▼27.9238.48 ▲0.86
Add New Post /wp-admin/post-new.php726 ▼8021.71 ▼21.3224.11 ▼630.3524.62 ▼30.60
Media Library /wp-admin/upload.php816 ▼5841.71 ▼2.4821.14 ▼87.9031.21 ▼15.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • recovery_mode_email_last_sent
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wpsurveys/register.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: questionary, image, answer, surveys, statistics...

wpsurveys/survey.php 92% from 13 tests

This is the main PHP file of "WPSurveys" version 0.2.8.3, 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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wpsurveys.php" instead of "survey.php")

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
Good job! No executable or dangerous file extensions detected14,425 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
SVG40159,422
JavaScript25142832,950
PHP31331421,887
CSS63110166

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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
Namespaces2
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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