10% easy-polls

Code Review | Easy Polls

WordPress plugin Easy Polls scored10%from 54 tests.

About plugin

  • Plugin page: easy-polls
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 29, 2017
  • Latest release: Apr 29, 2017
  • Number of updates: 3
  • Update frequency: every 6.7 days
  • Top authors: ifourkuldeep1 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /604 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method EasyPolls::my_plugin_create_db() should not be called statically

Server metrics [RAM: ▲0.08MB] [CPU: ▼4.69ms] Passed 4 tests

This is a short check of server-side resources used by Easy Polls
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0941.95 ▼2.01
Dashboard /wp-admin3.39 ▲0.0948.95 ▼5.17
Posts /wp-admin/edit.php3.44 ▲0.0851.53 ▼1.72
Add New Post /wp-admin/post-new.php5.97 ▲0.0886.24 ▼9.84
Media Library /wp-admin/upload.php3.32 ▲0.0838.48 ▲5.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 4 new files
Database: 3 new tables, 6 new options
New tables
wp_easypolls_results
wp_easypolls_question
wp_easypolls_option
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Easy Polls
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,915 ▲15413.41 ▼0.948.40 ▲6.6844.08 ▲4.45
Dashboard /wp-admin2,210 ▲305.56 ▲0.0393.51 ▲5.3040.21 ▼1.20
Posts /wp-admin/edit.php2,118 ▲151.99 ▼0.0234.42 ▼0.1438.96 ▲1.55
Add New Post /wp-admin/post-new.php1,542 ▲723.38 ▲5.12734.16 ▲49.7954.86 ▼19.34
Media Library /wp-admin/upload.php1,421 ▲214.19 ▼0.0496.06 ▼12.8643.94 ▼2.90

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method EasyPolls::easypolls_deactivation_hook() should not be called statically
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
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 undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes: You can look at the official readme.txt

easy-polls/easy-polls.php Passed 13 tests

Analyzing the main PHP file in "Easy Polls" version 1.0
42 characters long description:
Easy Polls create exit polls in your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin770 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP117380523
CSS1214217
JavaScript16230

PHP code Passed 2 tests

A short 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.20
Average class complexity39.00
▷ Minimum class complexity39.00
▷ Maximum class complexity39.00
Average method complexity4.17
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin