78% dropdown-content

Code Review | Dropdown Content

WordPress plugin Dropdown Content scored78%from 54 tests.

About plugin

  • Plugin page: dropdown-content
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.6.1
  • WordPress version: 6.3.1
  • First release: Sep 27, 2016
  • Latest release: Sep 23, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: metaloha (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /6,161 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Dropdown Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.05 ▼5.60
Dashboard /wp-admin3.34 ▼0.0150.63 ▼6.67
Posts /wp-admin/edit.php3.39 ▲0.0350.63 ▼3.89
Add New Post /wp-admin/post-new.php5.92 ▲0.0394.66 ▼5.84
Media Library /wp-admin/upload.php3.26 ▲0.0338.49 ▲4.00

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Dropdown Content
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲11413.57 ▼0.805.34 ▲3.1142.61 ▼2.25
Dashboard /wp-admin2,220 ▲205.83 ▼0.08100.03 ▼12.7939.72 ▼0.31
Posts /wp-admin/edit.php2,102 ▲52.04 ▲0.0140.31 ▲3.0034.12 ▲1.07
Add New Post /wp-admin/post-new.php1,528 ▼317.50 ▼5.73656.82 ▲30.8949.01 ▼2.85
Media Library /wp-admin/upload.php1,399 ▼14.22 ▼0.05104.58 ▼7.0844.32 ▼1.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-content.php
    • > /wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown.php
    • > /wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-option.php
  • 20× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-content.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-option.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-content.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-content.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-content.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-content.php on line 1
    • > PHP Notice
      Undefined variable: dropdown_vars in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown.php on line 1
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/dropdown-content/dropdowncontent-partials/dropdown-option.php on line 1

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: drop-down, select, dropdown, shortcode

dropdown-content/plugin.php 85% from 13 tests

The main PHP script in "Dropdown Content" version 1.0.2 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("dropdown-content.php" instead of "plugin.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
There were no executable files found in this plugin248 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP73131165
JavaScript26574
CSS2019

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods216.67%
▷ Public methods1083.33%
▷ Protected methods00.00%
▷ Private methods216.67%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin