79% sided

Code Review | Sided

WordPress plugin Sided scored79%from 54 tests.

About plugin

  • Plugin page: sided
  • Plugin version: 1.2.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Jan 17, 2023
  • Latest release: Oct 31, 2023
  • Number of updates: 21
  • Update frequency: every 13.8 days
  • Top authors: sided (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /598 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
This plugin's installer ran successfully

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

An overview of server-side resources used by Sided
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0838.28 ▼0.05
Dashboard /wp-admin3.39 ▲0.0546.24 ▼16.53
Posts /wp-admin/edit.php3.51 ▲0.1550.13 ▲5.73
Add New Post /wp-admin/post-new.php6.00 ▲0.1191.29 ▲1.20
Media Library /wp-admin/upload.php3.32 ▲0.0938.36 ▲5.46
Edit Poll /wp-admin/admin.php?page=dashboard&debate=&action=edit3.2931.30
Create Poll /wp-admin/admin.php?page=create-debate3.4132.46
Create Poll from Block /wp-admin/admin.php?page=create-debate-from-block3.4031.46
Edit Draft /wp-admin/admin.php?page=edit-draft3.4131.74
Settings /wp-admin/admin.php?page=settings3.3131.55
Dashboard /wp-admin/admin.php?page=dashboard3.2930.61

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 28 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Sided
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲6914.28 ▲0.081.96 ▲0.3141.81 ▼3.14
Dashboard /wp-admin2,233 ▲535.75 ▲0.1090.03 ▼1.2238.77 ▼4.93
Posts /wp-admin/edit.php2,146 ▲462.32 ▲0.3838.80 ▲4.9738.64 ▲6.22
Add New Post /wp-admin/post-new.php1,568 ▲4223.27 ▼0.24587.81 ▼108.3034.15 ▼24.53
Media Library /wp-admin/upload.php1,446 ▲494.52 ▲0.3595.72 ▼1.5542.18 ▲2.16
Edit Poll /wp-admin/admin.php?page=dashboard&debate=&action=edit8731.8625.4248.02
Create Poll /wp-admin/admin.php?page=create-debate1,5852.9231.4537.69
Create Poll from Block /wp-admin/admin.php?page=create-debate-from-block1,5822.8831.7437.61
Edit Draft /wp-admin/admin.php?page=edit-draft1,5792.7730.0137.43
Settings /wp-admin/admin.php?page=settings8951.9424.8536.22
Dashboard /wp-admin/admin.php?page=dashboard8761.8924.2637.47

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

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

Smoke tests 50% from 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions 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/sided/partials/includes/sided-common-header.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sided/partials/includes/sided-authenticate-apikey.php:3
    • > PHP Warning
      Use of undefined constant SIDED_VERSION - assumed 'SIDED_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/sided/partials/includes/sided-common-header.php on line 45
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sided/includes/block-editor/sided-block-editor.php:3
    • > PHP Notice
      Undefined variable: status_aat in wp-content/plugins/sided/partials/includes/sided-common-header.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/sided/sided.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sided/partials/includes/sided-settings-header.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sided/partials/includes/sided-authenticate-apikey.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sided/partials/includes/sided-authenticate-apikey.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sided/partials/includes/sided-authenticate-apikey.php:3
    • > PHP Notice
      Undefined variable: status_aat in wp-content/plugins/sided/partials/includes/sided-common-header.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration Passed 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
5 plugin tags: polls, polling, survey, comments, commenting

sided/sided.php Passed 13 tests

The entry point to "Sided" version 1.2.8 is a PHP file that has certain tags in its header comment area
72 characters long description:
It is a wordpress plugin to embed sided polls in your Wordpress website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin6,483 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP152631633,253
CSS3107221,692
Sass170836
JavaScript43315686
JSX11016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions25
▷ Named functions2288.00%
▷ Anonymous functions312.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin