78% wp247-get-option-shortcode

Code Review | WP247 Get Option Shortcode

WordPress plugin WP247 Get Option Shortcode scored78%from 54 tests.

About plugin

  • Plugin page: wp247-get-option-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Apr 9, 2015
  • Latest release: Aug 8, 2021
  • Number of updates: 10
  • Update frequency: every 231.6 days
  • Top authors: wescleveland (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /916 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.20MB] [CPU: ▼4.79ms] Passed 4 tests

An overview of server-side resources used by WP247 Get Option Shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1839.36 ▲0.48
Dashboard /wp-admin3.51 ▲0.2145.00 ▼5.92
Posts /wp-admin/edit.php3.62 ▲0.2749.74 ▼1.49
Add New Post /wp-admin/post-new.php6.08 ▲0.2078.67 ▼12.23
Media Library /wp-admin/upload.php3.43 ▲0.2036.27 ▲3.57
Get Option Shortcode /wp-admin/tools.php?page=wp247_get_option_shortcode_options3.4334.43

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WP247 Get Option Shortcode
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.25 ▼1.061.69 ▼0.0642.90 ▲0.65
Dashboard /wp-admin2,207 ▲195.83 ▲0.92100.25 ▼15.8340.19 ▼6.45
Posts /wp-admin/edit.php2,101 ▲122.04 ▲0.0641.09 ▲3.2237.99 ▲5.14
Add New Post /wp-admin/post-new.php1,542 ▼023.12 ▲4.88712.33 ▲117.6251.63 ▲4.51
Media Library /wp-admin/upload.php1,397 ▲94.19 ▼0.0098.98 ▲0.4942.09 ▼3.30
Get Option Shortcode /wp-admin/tools.php?page=wp247_get_option_shortcode_options1,2583.5347.3433.54

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • wp247_get_option_shortcode
    • widget_theysaidso_widget
    • db_upgraded

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
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp247-get-option-shortcode/admin/wp247-settings-api/wp247-settings-api.class.php
    • > /wp-content/plugins/wp247-get-option-shortcode/admin/wp247-settings-api/wp247-settings-api.php
    • > /wp-content/plugins/wp247-get-option-shortcode/admin/wp247xns-client-corequisite-notice/wp247xns-client-corequisite-notice.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp247-get-option-shortcode/admin/wp247-get-option-shortcode-admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp247-get-option-shortcode/wp247-get-option-shortcode.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp247-get-option-shortcode === )
Please take inspiration from this readme.txt

wp247-get-option-shortcode/wp247-get-option-shortcode.php Passed 13 tests

"WP247 Get Option Shortcode" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
58 characters long description:
Include WordPress options anywhere shortcodes are accepted

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,242 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP52145211,010
JavaScript21315118
CSS1283114

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity52.75
▷ Minimum class complexity5.00
▷ Maximum class complexity169.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods75
▷ Static methods34.00%
▷ Public methods7397.33%
▷ Protected methods00.00%
▷ Private methods22.67%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin