56% my-own-shortcodes

Code Review | My Own Shortcodes

WordPress plugin My Own Shortcodes scored56%from 54 tests.

About plugin

  • Plugin page: my-own-shortcodes
  • Plugin version: 0.0.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.8.2
  • WordPress version: 6.3.1
  • First release: Nov 21, 2017
  • Latest release: Dec 5, 2017
  • Number of updates: 5
  • Update frequency: every 4.2 days
  • Top authors: klickonit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /600 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.83MB] [CPU: ▼31.92ms] Passed 4 tests

This is a short check of server-side resources used by My Own Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1339.91 ▼0.60
Dashboard /wp-admin3.12 ▼0.1926.71 ▼20.71
Posts /wp-admin/edit.php3.12 ▼0.2425.55 ▼22.86
Add New Post /wp-admin/post-new.php3.12 ▼2.7725.61 ▼70.79
Media Library /wp-admin/upload.php3.12 ▼0.1123.41 ▼13.30
My Own Shortcodes /wp-admin/options-general.php?page=klick_mos3.1225.95

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 54 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
klick-mos-logging
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for My Own Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲16413.66 ▼0.694.85 ▲3.0639.08 ▼7.49
Dashboard /wp-admin2,216 ▲285.86 ▼0.0298.41 ▼13.9139.07 ▼6.10
Posts /wp-admin/edit.php2,102 ▲162.05 ▲0.0442.33 ▲5.2334.11 ▼2.04
Add New Post /wp-admin/post-new.php1,535 ▲2118.17 ▲0.62666.80 ▼26.2366.97 ▲19.99
Media Library /wp-admin/upload.php1,401 ▲164.29 ▲0.09101.52 ▼0.6747.41 ▲3.10
My Own Shortcodes /wp-admin/options-general.php?page=klick_mos2,1166.59135.7087.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=klick_mos
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/options-general.php?page=klick_mos
    • > Warning in wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-shortcodes.php+102
    count(): Parameter must be an array or an object that implements Countable

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 fix the following items
  • 15× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-abstract-logger.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-commands.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-abstract-notice.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-notifier.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-shortcodes.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-dashboard.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-email-logger.php
    • > /wp-content/plugins/my-own-shortcodes/my-own-shortcodes.php
    • > /wp-content/plugins/my-own-shortcodes/includes/class-klick-mos-logger.php
    • > /wp-content/plugins/my-own-shortcodes/templates/klick-mos-tabs-header.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/my-own-shortcodes/templates/klick-mos-tab-our-other-plugins.php:3
    • > PHP Warning
      Use of undefined constant KLICK_MOS_PLUGIN_URL - assumed 'KLICK_MOS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-own-shortcodes/templates/klick-mos-tab-our-other-plugins.php on line 3
    • > PHP Warning
      Use of undefined constant KLICK_MOS_PLUGIN_URL - assumed 'KLICK_MOS_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/my-own-shortcodes/templates/klick-mos-tab-my-shortcodes.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Klick_Mos() in wp-content/plugins/my-own-shortcodes/templates/klick-mos-tab-my-shortcodes.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=klick_mos
    • > Network (severe)
    wp-content/plugins/my-own-shortcodes//images/our-more-plugins/APV.svg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=klick_mos
    • > Network (severe)
    wp-content/plugins/my-own-shortcodes//images/our-more-plugins/ATS.svg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Shortcode Add Tab), #2 (Shortcode List Tab), #3 (How to use)
The official readme.txt is a good inspiration

my-own-shortcodes/my-own-shortcodes.php 92% from 13 tests

The principal PHP file in "My Own Shortcodes" v. 0.0.2 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,248 lines of code in 43 files:
LanguageFilesBlank linesComment linesLines of code
PHP20310560950
SVG11011521
CSS62012447
JavaScript444150244
Markdown247086

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.46
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods84
▷ Static methods67.14%
▷ Public methods8398.81%
▷ Protected methods00.00%
▷ Private methods11.19%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.15MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/mos-banner.png65.45KB23.16KB▼ 64.62%
images/notices/mos_sample_notice_icon2.png9.63KB4.69KB▼ 51.23%
images/notices/mos_sample_notice_icon3.png30.17KB6.04KB▼ 79.98%
images/notices/mos_sample_notice_icon.png20.74KB1.79KB▼ 91.39%
images/small_icon.png18.12KB0.45KB▼ 97.52%