84% total-soft-poll-extensions

Code Review | Total Soft Poll Extensions

WordPress plugin Total Soft Poll Extensions scored84%from 54 tests.

About plugin

  • Plugin page: total-soft-poll-e...
  • Plugin version: 1.4.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.4
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: Jun 13, 2020
  • Number of updates: 14
  • Update frequency: N/A
  • Top authors: devkaleb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /372 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
Install script ran successfully

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

This is a short check of server-side resources used by Total Soft Poll Extensions
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0337.82 ▼3.94
Dashboard /wp-admin3.37 ▼0.0146.99 ▼17.82
Posts /wp-admin/edit.php3.42 ▲0.0349.12 ▲2.87
Add New Post /wp-admin/post-new.php5.95 ▲0.0383.60 ▼14.05
Media Library /wp-admin/upload.php3.29 ▲0.0339.70 ▲6.18

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Total Soft Poll Extensions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.28 ▼1.371.56 ▼0.2942.25 ▲1.34
Dashboard /wp-admin2,232 ▲444.85 ▼1.0498.79 ▼17.9340.73 ▼1.86
Posts /wp-admin/edit.php2,111 ▲222.02 ▲0.0534.90 ▼1.6831.33 ▼0.22
Add New Post /wp-admin/post-new.php1,553 ▲3923.26 ▲5.67662.32 ▼19.5652.52 ▼11.59
Media Library /wp-admin/upload.php1,414 ▲264.22 ▲0.00100.38 ▲0.2844.13 ▲2.08

Uninstaller [IO: ✅] [DB: ▲0.00MB] 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
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/total-soft-poll-extensions/ts-extension.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: total-soft poll, vote, poll plugin, votes, total soft poll...

total-soft-poll-extensions/ts-extension.php 92% from 13 tests

Analyzing the main PHP file in "Total Soft Poll Extensions" version 1.4.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("total-soft-poll-extensions.php" instead of "ts-extension.php")

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
Everything looks great! No dangerous files found in this plugin184 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP118786184

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
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 complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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 files were detected