74% dynamic-text

Code Review | Dynamic Text

WordPress plugin Dynamic Text scored74%from 54 tests.

About plugin

  • Plugin page: dynamic-text
  • Plugin version: 2.1.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jul 30, 2015
  • Latest release: Feb 13, 2017
  • Number of updates: 29
  • Update frequency: every 19.5 days
  • Top authors: ripjustice (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,169 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼0.91MB] [CPU: ▼34.69ms] Passed 4 tests

Analyzing server-side resources used by Dynamic Text
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.90 ▼8.02
Dashboard /wp-admin3.03 ▼0.2727.74 ▼26.96
Posts /wp-admin/edit.php3.03 ▼0.3327.94 ▼25.50
Add New Post /wp-admin/post-new.php3.03 ▼2.8622.18 ▼78.28
Media Library /wp-admin/upload.php3.03 ▼0.2025.32 ▼7.28

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
DynamicDomain_1
widget_theysaidso_widget
placeholderdd
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Dynamic Text
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.28 ▲1.001.76 ▼0.2245.84 ▲3.64
Dashboard /wp-admin2,207 ▲305.54 ▼0.1891.08 ▼1.5266.14 ▲25.49
Posts /wp-admin/edit.php2,118 ▲151.98 ▼0.0236.77 ▼2.7335.63 ▼0.25
Add New Post /wp-admin/post-new.php1,563 ▲3518.46 ▼4.62614.88 ▼31.39162.83 ▲109.76
Media Library /wp-admin/upload.php1,418 ▲184.19 ▲0.0296.34 ▼8.5773.57 ▲32.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/dynamic-text/dynamic_text_options.php+28
    Use of undefined constant wipeout - assumed 'wipeout' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options detected upon uninstall: 8 options
    • placeholderdd
    • DynamicDomain_1
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-text/dynamic_text_options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-text/dynamic_text_options.php:4

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)
No browser issues were found

Optimizations

Plugin configuration 96% 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
7 plugin tags: content, text, localization, plugin, page...

dynamic-text/dynamic_text.php 92% from 13 tests

This is the main PHP file of "Dynamic Text" version 2.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("dynamic-text.php" instead of "dynamic_text.php")

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
There were no executable files found in this plugin260 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2819260

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
dt_icon.png0.42KB0.36KB▼ 14.49%