62% moonclerk-wp-shortcode

Code Review | MoonClerk WP Shortcode

WordPress plugin MoonClerk WP Shortcode scored62%from 54 tests.

About plugin

  • Plugin page: moonclerk-wp-shor...
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.5
  • WordPress version: 6.3.1
  • First release: Nov 6, 2014
  • Latest release: Jul 19, 2021
  • Number of updates: 27
  • Update frequency: every 90.7 days
  • Top authors: MoonClerk (92.59%)kevindees (11.11%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /4,853 total downloads

Benchmarks

Plugin footprint 65% 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.95MB] [CPU: ▼34.53ms] Passed 4 tests

An overview of server-side resources used by MoonClerk WP Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.93 ▲2.95
Dashboard /wp-admin3.00 ▼0.3422.58 ▼35.59
Posts /wp-admin/edit.php3.00 ▼0.3527.69 ▼24.86
Add New Post /wp-admin/post-new.php3.00 ▼2.8823.31 ▼67.81
Media Library /wp-admin/upload.php3.00 ▼0.2223.60 ▼9.86
MoonClerk /wp-admin/tools.php?page=moonclerk-wp-shortcode/moonclerk-wp-shortcode.php3.0025.77

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

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

Browser metrics Passed 4 tests

MoonClerk WP Shortcode: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.27 ▼1.081.83 ▼0.2444.07 ▲4.82
Dashboard /wp-admin2,210 ▲225.85 ▲0.95110.79 ▼2.2343.77 ▼2.80
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0435.06 ▼7.2134.18 ▼2.93
Add New Post /wp-admin/post-new.php1,517 ▼217.49 ▼5.56688.88 ▲34.3151.35 ▲0.83
Media Library /wp-admin/upload.php1,395 ▲104.24 ▲0.01105.35 ▲8.8649.11 ▲7.42
MoonClerk /wp-admin/tools.php?page=moonclerk-wp-shortcode/moonclerk-wp-shortcode.php8332.0225.9133.96

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > 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 were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=moonclerk-wp-shortcode/moonclerk-wp-shortcode.php
    • > 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.)

SRP 0% 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
Please fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/moonclerk-wp-shortcode/moonclerk-wp-shortcode.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/moonclerk-wp-shortcode/page.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/moonclerk-wp-shortcode/shortcodes.php:53

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

Optimizations

Plugin configuration 97% 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
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Copy the shortcode for the payment form from your MoonClerk account.), #2 (Paste the shortcode into the Text or Visual editor area of your Wordpress admin.), #3 (The form will embed in that page or post.)
The official readme.txt is a good inspiration

moonclerk-wp-shortcode/moonclerk-wp-shortcode.php Passed 13 tests

"MoonClerk WP Shortcode" version 1.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
73 characters long description:
This plugin gives you the ability to add MoonClerk embeds via Shortcodes.

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
No dangerous file extensions were detected115 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3365286
Markdown115020
JavaScript1239

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
3 PNG files occupy 0.17MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png76.95KB22.46KB▼ 70.81%
screenshot-2.png66.17KB19.37KB▼ 70.73%
screenshot-1.png32.66KB9.50KB▼ 70.91%