77% surveylock-me

Code Review | SurveyLock.me

WordPress plugin SurveyLock.me scored77%from 54 tests.

About plugin

  • Plugin page: surveylock-me
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.7
  • WordPress version: 6.3.1
  • First release: May 25, 2021
  • Latest release: Jun 9, 2021
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: surveylock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /365 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.30MB] [CPU: ▼3.88ms] Passed 4 tests

This is a short check of server-side resources used by SurveyLock.me
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2841.47 ▲2.66
Dashboard /wp-admin3.66 ▲0.3249.53 ▼9.31
Posts /wp-admin/edit.php3.71 ▲0.3544.34 ▼0.06
Add New Post /wp-admin/post-new.php6.20 ▲0.3186.83 ▼8.79
Media Library /wp-admin/upload.php3.52 ▲0.2937.79 ▲5.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 84 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
slm_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by SurveyLock.me
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,983 ▲23713.83 ▼0.795.98 ▲4.2543.18 ▼4.87
Dashboard /wp-admin2,281 ▲935.14 ▼0.74119.46 ▲16.7942.51 ▲1.08
Posts /wp-admin/edit.php2,163 ▲742.38 ▲0.3737.14 ▲1.4234.00 ▼0.34
Add New Post /wp-admin/post-new.php6,246 ▲4,71326.16 ▲2.90913.76 ▲290.3938.63 ▼11.34
Media Library /wp-admin/upload.php1,460 ▲724.45 ▲0.1999.28 ▲1.5542.94 ▲1.64

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • slm_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 fix the following items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/surveylock-me/templates/common/loaders/bars_loader.php
    • > /wp-content/plugins/surveylock-me/templates/public/cta.php
    • > /wp-content/plugins/surveylock-me/templates/public/shortcode.php
    • > /wp-content/plugins/surveylock-me/templates/admin/sections/content/helper.php
    • > /wp-content/plugins/surveylock-me/survey-lock-me.php
  • 49× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/content/brand.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/common/loader_color.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/content/loader_text.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/common/cta_text.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/content/loader_color.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/common/cta_button_color.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/content/max_block_height.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function srvlm_get_option() in wp-content/plugins/surveylock-me/templates/admin/sections/snax/loader_text.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function checked() in wp-content/plugins/surveylock-me/templates/admin/sections/common/debug_mode.php:2
    • > PHP Notice
      Undefined variable: maxHeight in wp-content/plugins/surveylock-me/templates/public/shortcode.php on line 1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: monetization, content lock

surveylock-me/survey-lock-me.php 69% from 13 tests

"SurveyLock.me" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("surveylock-me.php" instead of "survey-lock-me.php")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
  • Domain Path: The domain path should be prefixed with a forward slash character ("/languages")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin2,479 lines of code in 78 files:
LanguageFilesBlank linesComment linesLines of code
PHP563082131,536
JavaScript8730560
Sass6420301
SVG20064
JSON20014
CSS4004

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.73
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces1
Traits0
Classes10
▷ Abstract classes110.00%
▷ Concrete classes990.00%
▷ Final classes00.00%
Methods132
▷ Static methods118.33%
▷ Public methods8362.88%
▷ Protected methods2720.45%
▷ Private methods2216.67%
Functions19
▷ Named functions1789.47%
▷ Anonymous functions210.53%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin