83% surveys-by-feedback-cat

Code Review | Surveys by Feedback Cat

WordPress plugin Surveys by Feedback Cat scored83%from 54 tests.

About plugin

  • Plugin page: surveys-by-feedba...
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.3
  • WordPress version: 6.3.1
  • First release: Jun 25, 2015
  • Latest release: Jul 16, 2015
  • Number of updates: 16
  • Update frequency: every 1.3 days
  • Top authors: davidhme (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

100+ active /9,806 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
Install script ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼3.15ms] Passed 4 tests

A check of server-side resources used by Surveys by Feedback Cat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2953.12 ▲6.66
Dashboard /wp-admin3.39 ▲0.0954.60 ▼7.47
Posts /wp-admin/edit.php3.51 ▲0.1551.24 ▲2.29
Add New Post /wp-admin/post-new.php5.97 ▲0.0995.49 ▼11.35
Media Library /wp-admin/upload.php3.32 ▲0.0940.12 ▲3.93

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Surveys by Feedback Cat
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5214.10 ▼0.321.97 ▲0.2142.53 ▼1.15
Dashboard /wp-admin2,216 ▲395.68 ▲0.0291.19 ▼11.3036.91 ▼7.81
Posts /wp-admin/edit.php2,118 ▲182.00 ▼0.0234.28 ▼2.2635.26 ▼2.31
Add New Post /wp-admin/post-new.php1,544 ▲1823.65 ▼0.02691.31 ▲1.8955.51 ▼3.21
Media Library /wp-admin/upload.php1,418 ▲184.22 ▲0.0498.88 ▼8.0642.59 ▼3.14

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 58× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/surveys-by-feedback-cat/lib/mustache.php-2.8.0/src/Mustache/Exception/SyntaxException.php:15
    • > PHP Warning
      require_once(FCA_FBC_INCLUDES_DIR/FCA/Component.php): failed to open stream: No such file or directory in wp-content/plugins/surveys-by-feedback-cat/includes/FCA/FBC/Poll/Component.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'FCA_FBC_INCLUDES_DIR/FCA/Form.php' (include_path='.:/usr/share/php') in wp-content/plugins/surveys-by-feedback-cat/includes/FCA/FBC/Poll/Admin/Form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/surveys-by-feedback-cat/lib/mustache.php-2.8.0/src/Mustache/Loader/ArrayLoader.php:27
    • > PHP Fatal error
      require_once(): Failed opening required 'FCA_FBC_INCLUDES_DIR/FCA/Form.php' (include_path='.:/usr/share/php') in wp-content/plugins/surveys-by-feedback-cat/includes/FCA/FBC/Poll/Admin/Form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Logger' not found in wp-content/plugins/surveys-by-feedback-cat/lib/mustache.php-2.8.0/src/Mustache/Logger/AbstractLogger.php:21
    • > PHP Warning
      require_once(FCA_FBC_INCLUDES_DIR/FCA/MetaBox.php): failed to open stream: No such file or directory in wp-content/plugins/surveys-by-feedback-cat/includes/FCA/FBC/Poll/Admin/FormMetaBox.php on line 3
    • > PHP Fatal error
      require_once(): Failed opening required 'FCA_FBC_INCLUDES_DIR/FCA/Form.php' (include_path='.:/usr/share/php') in wp-content/plugins/surveys-by-feedback-cat/includes/FCA/FBC/Poll/Admin/Form.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Mustache_Logger_AbstractLogger' not found in wp-content/plugins/surveys-by-feedback-cat/lib/mustache.php-2.8.0/src/Mustache/Logger/StreamLogger.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Loader' not found in wp-content/plugins/surveys-by-feedback-cat/lib/mustache.php-2.8.0/src/Mustache/Loader/FilesystemLoader.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: Add images for these screenshots: #1 (A multiple choice feedback / surveys form), #2 (A longform text feedback / surveys form), #3 (Confirmation screen), #4 (Our simple 1-page user interface)
The official readme.txt might help

surveys-by-feedback-cat/feedback-cat.php 92% from 13 tests

This is the main PHP file of "Surveys by Feedback Cat" version 1.2.2, 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: Please rename the main PHP file in this plugin to the plugin slug ("surveys-by-feedback-cat.php" instead of "feedback-cat.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin17,959 lines of code in 179 files:
LanguageFilesBlank linesComment linesLines of code
PHP671,7633,3857,825
Sass509461203,748
CSS33492343,393
LESS1326331,343
SVG100565
Markdown21380556
JavaScript59922407
Mustache37044
JSON10028
XML14123
Bourne Shell14318
YAML1007
make1102

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Please fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity20.78
▷ Minimum class complexity1.00
▷ Maximum class complexity467.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces5
Traits0
Classes64
▷ Abstract classes710.94%
▷ Concrete classes5789.06%
▷ Final classes00.00%
Methods597
▷ Static methods447.37%
▷ Public methods31652.93%
▷ Protected methods20434.17%
▷ Private methods7712.90%
Functions12
▷ Named functions866.67%
▷ Anonymous functions433.33%
Constants111
▷ Global constants65.41%
▷ Class constants10594.59%
▷ Public constants105100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.31MB with 0.13MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png84.49KB48.52KB▼ 42.58%
screenshot-1.png6.61KB4.64KB▼ 29.87%
screenshot-3.png113.76KB60.45KB▼ 46.87%
screenshot-2.png117.20KB61.63KB▼ 47.41%