100% metashortcode

Code Review | MetaShortcode

WordPress plugin MetaShortcodescored 100% from 54 tests.

About plugin

  • Plugin page: metashortcode
  • Plugin version: 1.0
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.3.2
  • WordPress version: 5.8.1
  • First release: Oct 29, 2017
  • Latest release: Jan 3, 2020
  • Number of updates: 8
  • Update frequency: every 99.5 days
  • Top authors: codecide (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 575 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.04MB] [CPU: ▼139.44ms] Passed 4 tests

A check of server-side resources used by MetaShortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1533.88 ▲13.10
Dashboard /wp-admin3.11 ▲0.0548.86 ▲5.19
Posts /wp-admin/edit.php3.16 ▲0.0536.60 ▼8.25
Add New Post /wp-admin/post-new.php5.47 ▲0.0393.92 ▼550.62
Media Library /wp-admin/upload.php3.05 ▲0.0434.09 ▼4.06

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for MetaShortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,701 ▲10515.82 ▼0.148.95 ▼2.0248.68 ▲1.36
Dashboard /wp-admin2,992 ▲585.93 ▼0.18130.46 ▼21.13107.56 ▼8.96
Posts /wp-admin/edit.php2,758 ▲192.72 ▲0.0164.48 ▲0.0190.01 ▼0.39
Add New Post /wp-admin/post-new.php1,630 ▼5521.67 ▲2.52264.04 ▼122.29103.49 ▼4.89
Media Library /wp-admin/upload.php1,832 ▲225.07 ▲0.04156.59 ▲12.76120.98 ▼0.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstaller ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

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
These attributes need your attention:
  • Plugin Name: Please specify the plugin name on the first line ( === MetaShortcode=== )
Please take inspiration from this readme.txt

metashortcode/metashortcode.php Passed 13 tests

Analyzing the main PHP file in "MetaShortcode" version 1.0
46 characters long description:
Use custom fields as shortcode in post content

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected210 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP22460178
JavaScript11132

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity27.00
▷ Minimum class complexity27.00
▷ Maximum class complexity27.00
Average method complexity3.89
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin