10% pinnion

Code Review | Pinnion Plugin

WordPress plugin Pinnion Plugin scored10%from 54 tests.

About plugin

  • Plugin page: pinnion
  • Plugin version: 2.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.3.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2011
  • Latest release: Jun 20, 2013
  • Number of updates: 17
  • Update frequency: every 37.2 days
  • Top authors: michaelyerkovich (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active /11,065 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
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/pinnion/pinnion.php+14
    Use of undefined constant WP_INCLUDES_URL - assumed 'WP_INCLUDES_URL' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.94MB] [CPU: ▼50.34ms] Passed 4 tests

Analyzing server-side resources used by Pinnion Plugin
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.04 ▼1.425.08 ▼42.76
Dashboard /wp-admin2.06 ▼1.2411.26 ▼33.77
Posts /wp-admin/edit.php2.06 ▼1.296.31 ▼39.06
Add New Post /wp-admin/post-new.php2.06 ▼3.826.55 ▼85.75
Media Library /wp-admin/upload.php2.06 ▼1.166.53 ▼27.10
Editor /wp-admin/admin.php?page=pinnion_menu2.065.99
Settings /wp-admin/admin.php?page=pinnion_menu_settings2.066.60

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 20 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_pinnion_widget
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Pinnion Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲9113.70 ▼0.601.62 ▼0.2237.73 ▼12.90
Dashboard /wp-admin2,235 ▲475.84 ▲0.0097.32 ▼2.4277.30 ▲35.52
Posts /wp-admin/edit.php2,118 ▲291.97 ▼0.1637.95 ▲3.5135.85 ▼0.76
Add New Post /wp-admin/post-new.php1,689 ▲15622.39 ▼0.80652.16 ▼33.6063.76 ▲1.39
Media Library /wp-admin/upload.php1,414 ▲264.14 ▼0.04111.25 ▲2.7244.62 ▼1.50
Editor /wp-admin/admin.php?page=pinnion_menu1,1032.7649.2841.03
Settings /wp-admin/admin.php?page=pinnion_menu_settings8242.0224.5726.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/pinnion/pinnion.php+14
    Use of undefined constant WP_INCLUDES_URL - assumed 'WP_INCLUDES_URL' (this will throw an Error in a future version of PHP)
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_pinnion_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinnion_menu_settings
    • > Warning in wp-content/plugins/pinnion/pinnion.php+14
    Use of undefined constant WP_INCLUDES_URL - assumed 'WP_INCLUDES_URL' (this will throw an Error in a future version of PHP)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinnion_menu_settings
    • > Deprecated in wp-content/plugins/pinnion/widget.php+8
    Methods with the same name as their class will not be constructors in a future version of PHP; Pinnion_Widget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinnion_menu_settings
    • > Deprecated in wp-content/plugins/pinnion/widget.php+3
    Function create_function() is deprecated
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinnion_menu_settings
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in Pinnion_Widget is deprecated since version 4.3.0! Use __construct() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=pinnion_menu_settings
    • > Notice in wp-content/plugins/pinnion/admin_menu_settings_form.php+44
    Trying to access array offset on value of type bool

SRP 0% 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
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/pinnion/pinnion_post_popup.php
    • > /wp-content/plugins/pinnion/pinnion_link.php
    • > /wp-content/plugins/pinnion/deactivate.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/pinnion/pinnion.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pinnion/admin_menu_settings_form.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/pinnion/pinnion_post.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pinnion/admin_menu.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pinnion/pinnion.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pinnion/widget.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Preview the content of your Pinnion as you create it with our survey preview module on the Send screen in the authoring flow.), #2 (Select a Pinnion to be inserted directly into your WordPress blog post or), #3 (Pinnion widgets are fully customizable in each of your sidebars. Choose), #4 (Results are tabulated automatically and viewable from within the Pinnion)
The official readme.txt might help

pinnion/pinnion.php 92% from 13 tests

This is the main PHP file of "Pinnion Plugin" version 2.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 150 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin446 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP1097182419
JavaScript14527

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.25
Average class complexity7.50
▷ Minimum class complexity5.00
▷ Maximum class complexity10.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods990.00%
▷ Protected methods00.00%
▷ Private methods110.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
7 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png36.29KB13.43KB▼ 62.99%
screenshot-2.png61.30KB29.37KB▼ 52.09%
images/pinnion_original.png0.72KB0.52KB▼ 27.58%
images/pinnion_menu_icon.png0.37KB0.52KB0.00%
screenshot-1.png35.75KB11.27KB▼ 68.48%