83% dynaparent

Code Review | Dynaparent - Dynamic Parent Filter

WordPress plugin Dynaparent - Dynamic Parent Filter scored83%from 54 tests.

About plugin

  • Plugin page: dynaparent
  • Plugin version: 2.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 3, 2014
  • Latest release: Jan 11, 2023
  • Number of updates: 25
  • Update frequency: every 130.6 days
  • Top authors: StuckOn_dev (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,284 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

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

Analyzing server-side resources used by Dynaparent - Dynamic Parent Filter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.44 ▼1.82
Dashboard /wp-admin3.31 ▼0.0351.00 ▼14.32
Posts /wp-admin/edit.php3.36 ▲0.0146.66 ▼8.62
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.58 ▼10.94
Media Library /wp-admin/upload.php3.24 ▲0.0135.37 ▼0.72

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Dynaparent - Dynamic Parent Filter
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.75 ▲0.092.01 ▲0.1743.57 ▼0.77
Dashboard /wp-admin2,200 ▲235.64 ▼0.1085.48 ▼13.8538.12 ▼3.43
Posts /wp-admin/edit.php2,102 ▲22.04 ▲0.0733.83 ▼8.7234.78 ▼3.33
Add New Post /wp-admin/post-new.php1,546 ▲123.19 ▲0.11658.84 ▼42.9958.90 ▲5.93
Media Library /wp-admin/upload.php1,402 ▲24.29 ▲0.0994.43 ▼8.4045.27 ▼4.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

SRP 50% 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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynaparent/dynparent-plugin.php:15

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, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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: Screenshot #1 (The Dynaparent box in the right sidebar of a page edit screen.) image required
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === dynaparent === )
The official readme.txt might help

dynaparent/dynparent-plugin.php 92% from 13 tests

The main PHP script in "Dynaparent - Dynamic Parent Filter" version 2.1.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dynaparent.php" instead of "dynparent-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin167 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12016146
CSS10021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png23.81KB10.05KB▼ 57.79%