84% grappin

Code Review | Grappin.io Micro Surveys Widget

WordPress plugin Grappin.io Micro Surveys Widget scored84%from 54 tests.

About plugin

  • Plugin page: grappin
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.1
  • WordPress version: 6.3.1
  • First release: Apr 15, 2022
  • Latest release: Apr 15, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: grappin (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /223 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
Installer ran successfully

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

Analyzing server-side resources used by Grappin.io Micro Surveys Widget
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.53 ▼1.50
Dashboard /wp-admin3.33 ▲0.0354.58 ▲6.51
Posts /wp-admin/edit.php3.38 ▲0.0347.48 ▲0.72
Add New Post /wp-admin/post-new.php5.91 ▲0.0392.14 ▲0.80
Media Library /wp-admin/upload.php3.26 ▲0.0334.60 ▲1.18
Grappin /wp-admin/options-general.php?page=grappin_settings3.2331.85

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: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
grappin_version
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Grappin.io Micro Surveys Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.69 ▼0.834.39 ▲2.7343.34 ▲1.01
Dashboard /wp-admin2,209 ▲185.95 ▲0.13109.40 ▲4.2337.29 ▼4.01
Posts /wp-admin/edit.php2,095 ▲62.05 ▲0.0337.57 ▲3.3438.87 ▲4.93
Add New Post /wp-admin/post-new.php1,519 ▼017.88 ▼5.29651.99 ▲6.4354.76 ▼12.29
Media Library /wp-admin/upload.php1,394 ▲64.25 ▲0.0795.56 ▲0.8743.00 ▲1.47
Grappin /wp-admin/options-general.php?page=grappin_settings8552.0228.5354.23

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • grappin_version

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/grappin/grappin.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: csat, form, nps, survey, grappin...

grappin/grappin.php 92% from 13 tests

The entry point to "Grappin.io Micro Surveys Widget" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 172 characters long)

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
Good job! No executable or dangerous file extensions detected311 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP24118189
CSS115074
PO File191247
Markdown1101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods325.00%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/grappin-logo.png26.92KB14.60KB▼ 45.76%