84% surve

Code Review | Surve

WordPress plugin Surve scored84%from 54 tests.

About plugin

  • Plugin page: surve
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9
  • WordPress version: 6.3.1
  • First release: Oct 29, 2018
  • Latest release: Oct 29, 2018
  • Number of updates: 5
  • Update frequency: every 0.4 days
  • Top authors: surve (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /636 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
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Surve
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0453.04 ▲13.28
Dashboard /wp-admin3.35 ▲0.0549.50 ▼2.04
Posts /wp-admin/edit.php3.47 ▲0.1149.40 ▼1.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0591.13 ▼7.01
Media Library /wp-admin/upload.php3.28 ▲0.0539.86 ▲3.57
Surve /wp-admin/options-general.php?page=surve-settings3.2432.80

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Surve
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.17 ▼0.361.91 ▲0.2843.18 ▲1.17
Dashboard /wp-admin2,199 ▲225.61 ▼0.0492.45 ▼1.1340.58 ▼5.93
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0440.08 ▲5.1834.64 ▼6.61
Add New Post /wp-admin/post-new.php1,531 ▲523.22 ▼0.29653.52 ▼37.9580.82 ▲30.68
Media Library /wp-admin/upload.php1,398 ▼24.16 ▼0.0296.50 ▼15.2745.28 ▼4.56
Surve /wp-admin/options-general.php?page=surve-settings7972.0024.2223.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/surve/admin/partials/surve-admin-display.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Please specify the plugin name on the first line ( === surve === )
You can look at the official readme.txt

surve/surve.php Passed 13 tests

This is the main PHP file of "Surve" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
84 characters long description:
Met de Surve plugin plaatst u de code om Surve te gebruiken eenvoudig op uw website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin196 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9106440196

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods2080.00%
▷ Protected methods00.00%
▷ Private methods520.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin