84% shortcode-tester

Code Review | A Shortcode Tester

WordPress plugin A Shortcode Tester scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-tester
  • Plugin version: 1.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-5.3
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Jan 3, 2020
  • Number of updates: 19
  • Update frequency: every 80.8 days
  • Top authors: Magenta Cuda (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,383 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by A Shortcode Tester
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.17 ▲0.36
Dashboard /wp-admin3.31 ▼0.0345.91 ▼12.59
Posts /wp-admin/edit.php3.36 ▲0.0141.75 ▼6.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.29 ▼20.21
Media Library /wp-admin/upload.php3.23 ▲0.0132.38 ▼2.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for A Shortcode Tester
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.48 ▲0.081.97 ▲0.3043.34 ▲5.41
Dashboard /wp-admin2,203 ▲115.86 ▲0.91107.48 ▼6.8141.91 ▼2.52
Posts /wp-admin/edit.php2,089 ▼32.00 ▲0.0034.76 ▼8.1431.89 ▼5.93
Add New Post /wp-admin/post-new.php1,632 ▲10017.68 ▼5.58625.25 ▼38.0149.45 ▼7.33
Media Library /wp-admin/upload.php1,382 ▼94.19 ▲0.0396.20 ▼1.7342.27 ▼1.92

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_shortcode_tester\\is_admin() in wp-content/plugins/shortcode-tester/shortcode-tester.php:53
    • > PHP Fatal error
      Uncaught Error: Call to undefined function mc_shortcode_tester\\is_admin() in wp-content/plugins/shortcode-tester/shortcode-tester.php:53

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 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Invalid URI found ("")
You can look at the official readme.txt

shortcode-tester/shortcode-tester-loader.php 92% from 13 tests

The entry point to "A Shortcode Tester" version 1.2.2 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("shortcode-tester.php" instead of "shortcode-tester-loader.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected699 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP353215467
CSS122121
JavaScript1319111

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
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
Namespaces2
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods1
▷ Static methods00.00%
▷ Public methods1100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions28
▷ Named functions414.29%
▷ Anonymous functions2485.71%
Constants6
▷ Global constants6100.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
PNG images were not found in this plugin