84% surmetric-surveys

Code Review | Surmetric Surveys

WordPress plugin Surmetric Surveys scored84%from 54 tests.

About plugin

  • Plugin page: surmetric-surveys
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.7
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Jul 10, 2018
  • Number of updates: 2
  • Update frequency: every 24.0 days
  • Top authors: sophwarewp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /653 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.26ms] Passed 4 tests

Server-side resources used by Surmetric Surveys
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0167.86 ▼9.07
Dashboard /wp-admin3.29 ▼0.0178.72 ▼13.98
Posts /wp-admin/edit.php3.37 ▲0.0177.10 ▼8.78
Add New Post /wp-admin/post-new.php5.90 ▲0.01146.61 ▼1.20
Media Library /wp-admin/upload.php3.24 ▲0.0159.67 ▲3.45

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_sa_survey_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Surmetric Surveys
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9514.25 ▲0.285.09 ▲1.1574.29 ▲1.54
Dashboard /wp-admin2,246 ▲615.87 ▼0.03204.40 ▼5.0481.67 ▼11.57
Posts /wp-admin/edit.php2,105 ▲161.98 ▲0.0072.03 ▲0.4073.54 ▲1.83
Add New Post /wp-admin/post-new.php1,411 ▲1417.75 ▼0.02934.77 ▼28.9384.22 ▲11.39
Media Library /wp-admin/upload.php1,407 ▲194.19 ▲0.04174.00 ▼13.6798.30 ▲4.79

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-comments
    • widget_sa_survey_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/surmetric-surveys/survey_widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: analytics, opinion, survey, questionnaire, poll

surmetric-surveys/index.php 85% from 13 tests

"Surmetric Surveys" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 255 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("surmetric-surveys.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin195 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP32216185
JavaScript10010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin