90% refiner

Code Review | Refiner.io Popup Micro Surveys

WordPress plugin Refiner.io Popup Micro Surveys scored90%from 54 tests.

About plugin

  • Plugin page: refiner
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4.1
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: Jul 6, 2020
  • Number of updates: 4
  • Update frequency: every 14.8 days
  • Top authors: refiner (100%)

Code review

54 tests

User reviews

1 review

Install metrics

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.64ms] Passed 4 tests

Server-side resources used by Refiner.io Popup Micro Surveys
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.72 ▼0.44
Dashboard /wp-admin3.33 ▲0.0344.13 ▼1.82
Posts /wp-admin/edit.php3.38 ▲0.0243.41 ▼5.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.21 ▼2.86
Media Library /wp-admin/upload.php3.25 ▲0.0238.06 ▲2.81
Refiner /wp-admin/options-general.php?page=refiner_settings3.2232.79

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
db_upgraded
refiner_version
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Refiner.io Popup Micro Surveys: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8513.25 ▼1.391.77 ▲0.1940.42 ▼2.84
Dashboard /wp-admin2,212 ▲635.84 ▲0.1697.69 ▼2.8639.28 ▼2.54
Posts /wp-admin/edit.php2,092 ▲32.03 ▼0.0234.85 ▼5.8634.13 ▼3.19
Add New Post /wp-admin/post-new.php1,542 ▼018.40 ▼0.06606.77 ▼15.3455.38 ▲3.03
Media Library /wp-admin/upload.php1,394 ▲34.20 ▲0.0194.70 ▼5.0543.31 ▼2.23
Refiner /wp-admin/options-general.php?page=refiner_settings8522.0225.7723.66

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • refiner_version
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
8 plugin tags: feedback, net promoter score, poll, nps, survey...

refiner/refiner.php 92% from 13 tests

The main PHP script in "Refiner.io Popup Micro Surveys" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 166 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected172 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23611135
CSS16029
Markdown1708

PHP code Passed 2 tests

This is a very shot review 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.26
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/assets/refiner-logo.png25.09KB7.39KB▼ 70.55%