72% pollfish-for-wp

Code Review | Pollfish for Wordpress

WordPress plugin Pollfish for Wordpress scored72%from 54 tests.

About plugin

  • Plugin page: pollfish-for-wp
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: May 25, 2021
  • Latest release: May 21, 2022
  • Number of updates: 3
  • Update frequency: every 120.3 days
  • Top authors: spanrig (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /817 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.15MB] [CPU: ▼2.55ms] Passed 4 tests

Analyzing server-side resources used by Pollfish for Wordpress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1435.03 ▼6.91
Dashboard /wp-admin3.46 ▲0.1547.70 ▲0.06
Posts /wp-admin/edit.php3.57 ▲0.2151.62 ▲5.34
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.39 ▲2.78
Media Library /wp-admin/upload.php3.38 ▲0.1536.44 ▼6.13
PollFish for Wordpress /wp-admin/options-general.php?page=pollfish-for-wordpress3.3532.88

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Pollfish for Wordpress: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲18414.29 ▲0.3714.23 ▲12.4040.83 ▼1.52
Dashboard /wp-admin2,213 ▲224.81 ▼1.04107.99 ▲1.4936.66 ▼4.07
Posts /wp-admin/edit.php2,090 ▼21.97 ▼0.0636.36 ▲0.5930.91 ▼3.52
Add New Post /wp-admin/post-new.php1,517 ▲317.67 ▲0.17669.73 ▼13.5651.81 ▼8.37
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.06100.22 ▼14.4441.94 ▼6.24
PollFish for Wordpress /wp-admin/options-general.php?page=pollfish-for-wordpress1,0432.0526.4036.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=pollfish-for-wordpress
    • > Notice in wp-content/plugins/pollfish-for-wp/admin/class-pollfish-for-wordpress-admin.php+503
    Trying to access array offset on value of type bool

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/pollfish-for-wp/public/partials/pollfish-for-wordpress-public-display.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/pollfish-for-wp/admin/partials/pollfish-for-wordpress-admin-display.php:22

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 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: survey, monetization, pollfish, surveys, wordpress

pollfish-for-wp/pollfish-for-wp.php 92% from 13 tests

The main PHP script in "Pollfish for Wordpress" version 1.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected658 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12251546652
JavaScript24546
CSS2080

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity17.71
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods48
▷ Static methods24.17%
▷ Public methods4389.58%
▷ Protected methods00.00%
▷ Private methods510.42%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin