84% display-posts-shortcode-current-page-custom-field-add-on

Code Review | Display Posts Shortcode, Current Page Custom Field Add-On

WordPress plugin Display Posts Shortcode, Current Page Custom Field Add-On scored84%from 54 tests.

About plugin

  • Plugin page: display-posts-sho...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: Oct 9, 2014
  • Number of updates: 5
  • Update frequency: every 29.2 days
  • Top authors: itamaro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,048 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by Display Posts Shortcode, Current Page Custom Field Add-On
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.78 ▲2.14
Dashboard /wp-admin3.31 ▲0.0144.04 ▼1.50
Posts /wp-admin/edit.php3.36 ▲0.0145.29 ▲1.99
Add New Post /wp-admin/post-new.php5.89 ▲0.0179.63 ▼9.32
Media Library /wp-admin/upload.php3.23 ▲0.0032.49 ▲0.66

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Display Posts Shortcode, Current Page Custom Field Add-On
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.33 ▼1.051.73 ▲0.1344.47 ▲3.71
Dashboard /wp-admin2,206 ▲175.85 ▲0.7298.67 ▼11.4535.77 ▼6.79
Posts /wp-admin/edit.php2,092 ▲32.00 ▲0.0040.18 ▲5.3636.12 ▲5.04
Add New Post /wp-admin/post-new.php1,514 ▼2217.61 ▼5.77676.36 ▲1.8756.12 ▲0.84
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0394.84 ▲0.2342.90 ▲0.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/display-posts-shortcode-current-page-custom-field-add-on/dsp-current-page-custom-field-addon.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% 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
7 plugin tags: page, shortcode, list, pages, query...

display-posts-shortcode-current-page-custom-field-add-on/dsp-current-page-custom-field-addon.php 85% from 13 tests

"Display Posts Shortcode, Current Page Custom Field Add-On" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 161 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("display-posts-shortcode-current-page-custom-field-add-on.php" instead of "dsp-current-page-custom-field-addon.php")

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
There were no executable files found in this plugin11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP113211

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.33
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%
Functions1
▷ Named functions1100.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
No PNG images were found in this plugin