10% sinking-dropdowns

Code Review | Sinking Dropdowns WordPress

WordPress plugin Sinking Dropdowns WordPress scored10%from 54 tests.

About plugin

  • Plugin page: sinking-dropdowns
  • Plugin version: 1.25
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-3.5.1
  • WordPress version: 6.3.1
  • First release: May 24, 2013
  • Latest release: Jun 6, 2014
  • Number of updates: 12
  • Update frequency: every 31.5 days
  • Top authors: yonisink (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /12,032 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Parse error in wp-content/plugins/sinking-dropdowns/sinking-dropdowns.php+150
    syntax error, unexpected end of file

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.27ms] Passed 4 tests

A check of server-side resources used by Sinking Dropdowns WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.47 ▲2.21
Dashboard /wp-admin3.31 ▲0.0058.85 ▲5.21
Posts /wp-admin/edit.php3.36 ▲0.0052.53 ▲0.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.07 ▼6.59
Media Library /wp-admin/upload.php3.23 ▲0.0036.02 ▼0.77

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Sinking Dropdowns WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.30 ▼0.971.76 ▲0.0448.46 ▼0.44
Dashboard /wp-admin2,206 ▲185.89 ▲1.00110.35 ▲3.0546.77 ▲3.58
Posts /wp-admin/edit.php2,089 ▲31.97 ▼0.0439.65 ▲1.2132.16 ▼1.88
Add New Post /wp-admin/post-new.php1,536 ▲1623.41 ▲0.15652.23 ▼26.2255.21 ▼5.12
Media Library /wp-admin/upload.php1,388 ▲34.19 ▼0.0298.42 ▼4.1243.46 ▼0.97

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

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 no errors were found, this is by no means an exhaustive test

SRP 0% from 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sinking-dropdowns/views/backend_credits.php
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant SINKDROPDOWNS_PATH_INT - assumed 'SINKDROPDOWNS_PATH_INT' (this will throw an Error in a future version of PHP) in wp-content/plugins/sinking-dropdowns/controller/constants.php on line 11
    • > PHP Warning
      Use of undefined constant SINKDROPDOWNS_PATH_EXT - assumed 'SINKDROPDOWNS_PATH_EXT' (this will throw an Error in a future version of PHP) in wp-content/plugins/sinking-dropdowns/views/backend_credits.php on line 7
    • > PHP Warning
      Use of undefined constant SINKDROPDOWNS_version - assumed 'SINKDROPDOWNS_version' (this will throw an Error in a future version of PHP) in wp-content/plugins/sinking-dropdowns/views/backend_credits.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sinking-dropdowns/views/config.php:11
    • > PHP Warning
      Use of undefined constant SINKDROPDOWNS_title - assumed 'SINKDROPDOWNS_title' (this will throw an Error in a future version of PHP) in wp-content/plugins/sinking-dropdowns/views/backend_credits.php on line 4
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/sinking-dropdowns/sinking-dropdowns.php on line 150

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (sinking_dropdowns options - hover/click, and control colors), #2 (Hover menu on a full screen), #3 (Menu on a mobile width screen (automatic).)
You can take inspiration from this readme.txt

sinking-dropdowns/sinking-dropdowns.php Passed 13 tests

The primary PHP file in "Sinking Dropdowns WordPress" version 1.25 is used by WordPress to initiate all plugin functionality
26 characters long description:
Responsive Dropdown Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,330 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript42671611,443
CSS49160633
PHP59527242
SVG10012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants15
▷ Global constants15100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/logoSocialInk.png3.85KB2.85KB▼ 26.03%