78% dynamic-page-content

Code Review | Dynamic Page Content

WordPress plugin Dynamic Page Content scored78%from 54 tests.

About plugin

  • Plugin page: dynamic-page-content
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.2.1
  • WordPress version: 6.3.1
  • First release: May 22, 2015
  • Latest release: May 22, 2015
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: BenniSpi (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /1,700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.07ms] Passed 4 tests

A check of server-side resources used by Dynamic Page Content
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.63 ▼3.83
Dashboard /wp-admin3.31 ▲0.0145.18 ▼5.32
Posts /wp-admin/edit.php3.36 ▲0.0143.10 ▼6.98
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.62 ▼8.14
Media Library /wp-admin/upload.php3.23 ▲0.0137.41 ▲5.38

Server storage [IO: ▲0.07MB] [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: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Dynamic Page Content
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7313.24 ▼1.151.69 ▼0.0138.89 ▼7.17
Dashboard /wp-admin2,226 ▲385.86 ▲0.97103.02 ▼11.4075.59 ▲30.80
Posts /wp-admin/edit.php2,106 ▲171.98 ▼0.0834.88 ▼2.6234.75 ▼2.82
Add New Post /wp-admin/post-new.php1,529 ▲1023.12 ▲0.04788.07 ▲111.0650.39 ▼1.51
Media Library /wp-admin/upload.php1,407 ▲164.23 ▲0.05100.92 ▲3.8776.66 ▲34.40

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/dynamic-page-content/dynamiccontent.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dynamic-page-content/dynamiccontent_shortcode.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dynamic-page-content/index.php:12

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: content, adwords

dynamic-page-content/index.php 92% from 13 tests

This is the main PHP file of "Dynamic Page Content" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("dynamic-page-content.php" instead of "index.php")

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 plugin36 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP361336

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.08
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%
Functions3
▷ Named functions266.67%
▷ Anonymous functions133.33%
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.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png3.33KB0.87KB▼ 73.81%