84% dynamically-display-posts

Code Review | Dynamically Display Posts

WordPress plugin Dynamically Display Posts scored 84% from 54 tests.

About plugin

  • Plugin page: dynamically-displ...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 29, 2021
  • Latest release: Aug 26, 2023
  • Number of updates: 4
  • Update frequency: every 234.7 days
  • Top authors: markomaksym (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 422 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.15ms] Passed 4 tests

This is a short check of server-side resources used by Dynamically Display Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1540.59 ▼0.96
Dashboard /wp-admin3.51 ▲0.2148.39 ▼0.15
Posts /wp-admin/edit.php3.56 ▲0.2047.25 ▲1.72
Add New Post /wp-admin/post-new.php6.03 ▲0.1496.46 ▼1.22
Media Library /wp-admin/upload.php3.37 ▲0.1437.01 ▲2.89
DDP Settings /wp-admin/options-general.php?page=mx_ddp_settings3.3431.57

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Dynamically Display Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲19714.13 ▼0.249.50 ▲7.6937.28 ▼2.71
Dashboard /wp-admin2,211 ▲235.80 ▼0.1096.69 ▼8.5044.28 ▲1.08
Posts /wp-admin/edit.php2,097 ▲111.99 ▼0.0340.27 ▲3.8335.44 ▲3.72
Add New Post /wp-admin/post-new.php1,522 ▲223.53 ▲0.42632.83 ▼33.3252.16 ▲3.53
Media Library /wp-admin/upload.php1,396 ▲54.19 ▼0.0396.55 ▼6.4544.53 ▼3.10
DDP Settings /wp-admin/options-general.php?page=mx_ddp_settings8172.0524.7828.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/dynamically-display-posts/includes/admin/views/settings-page.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: pagination, display cpt, load more button, display posts

dynamically-display-posts/dynamically-display-posts.php Passed 13 tests

The entry point to "Dynamically Display Posts" version 1.1 is a PHP file that has certain tags in its header comment area
78 characters long description:
This plugin allows you to display a list of posts on your website on any page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected14,215 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript51,4241,5359,903
CSS41152,422
PHP278214171,172
SVG100685
PO File18833

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.31
Average class complexity5.55
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes14.55%
▷ Concrete classes2195.45%
▷ Final classes14.76%
Methods66
▷ Static methods2030.30%
▷ Public methods66100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants7
▷ Global constants7100.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
No PNG files were detected