10% shortcode-mastery-lite

Code Review | Shortcode Mastery

WordPress plugin Shortcode Mastery scored 10% from 54 tests.

About plugin

  • Plugin page: shortcode-mastery...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.0.3
  • WordPress version: 6.3.1
  • First release: Jul 19, 2017
  • Latest release: Feb 13, 2019
  • Number of updates: 38
  • Update frequency: every 15.1 days
  • Top authors: uncleserj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 990 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/lib/Twig/Node.php+198
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

Server metrics [RAM: ▲0.32MB] [CPU: ▼2.38ms] Passed 4 tests

This is a short check of server-side resources used by Shortcode Mastery
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.3241.74 ▲2.98
Dashboard /wp-admin3.62 ▲0.3248.23 ▲1.35
Posts /wp-admin/edit.php3.67 ▲0.3248.86 ▲1.12
Add New Post /wp-admin/post-new.php6.20 ▲0.3286.87 ▼12.38
Media Library /wp-admin/upload.php3.55 ▲0.3235.53 ▲0.38
All Shortcodes /wp-admin/admin.php?page=shortcode-mastery3.5235.03
Create Shortcode /wp-admin/admin.php?page=shortcode-mastery-create3.6042.28

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Shortcode Mastery
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19213.22 ▼1.071.74 ▲0.0446.76 ▲4.00
Dashboard /wp-admin2,331 ▲1404.92 ▲0.0695.70 ▼8.4468.16 ▲25.38
Posts /wp-admin/edit.php2,214 ▲1222.02 ▼0.0133.33 ▼7.0333.01 ▼2.83
Add New Post /wp-admin/post-new.php1,630 ▲11617.57 ▲0.01646.07 ▼25.2835.13 ▼20.73
Media Library /wp-admin/upload.php1,519 ▲1344.27 ▼0.02116.83 ▲8.4048.27 ▼2.11
All Shortcodes /wp-admin/admin.php?page=shortcode-mastery9991.7624.5034.37
Create Shortcode /wp-admin/admin.php?page=shortcode-mastery-create2,9948.98187.5286.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
  • 234× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Sandbox_SecurityError' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/lib/Twig/Sandbox/SecurityNotAllowedTagError.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/test/Twig/Tests/Profiler/Dumper/AbstractTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/test/Twig/Tests/ContainerRuntimeLoaderTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Node' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/lib/Twig/Node/ForLoop.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Extension' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/lib/Twig/Extension/Escaper.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Twig_ExtensionInterface' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/lib/Twig/Extension.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/test/Twig/Tests/Node/Expression/NullCoalesceTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Twig_Test_NodeTestCase' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/test/Twig/Tests/Node/IncludeTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/test/Twig/Tests/TokenStreamTest.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/shortcode-mastery-lite/includes/vendor/twig/twig/test/Twig/Tests/Extension/SandboxTest.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shortcode-mastery-create
    • > Network (severe)
    wp-content/plugins/shortcode-mastery-lite/images/sm-white.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: shortcode builder, shortcodes, shortcode

shortcode-mastery-lite/shortcode-mastery-lite.php 92% from 13 tests

The main PHP file in "Shortcode Mastery" ver. 2.0.0 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin136,359 lines of code in 646 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3710,2118,293110,081
PHP4806,5617,76621,052
reStructuredText892,4182,1373,372
C1171186860
CSS3526442
JSON400220
SVG8167200
YAML19144
XML14029
HTML110017
C/C++ Header171315
Twig86014
Markdown1408
m41215

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.01
▷ Minimum class complexity1.00
▷ Maximum class complexity268.00
Average method complexity2.34
▷ Minimum method complexity1.00
▷ Maximum method complexity68.00
Code structure
Namespaces23
Interfaces43
Traits0
Classes465
▷ Abstract classes153.23%
▷ Concrete classes45096.77%
▷ Final classes61.33%
Methods1,585
▷ Static methods392.46%
▷ Public methods1,40088.33%
▷ Protected methods1398.77%
▷ Private methods462.90%
Functions76
▷ Named functions7294.74%
▷ Anonymous functions45.26%
Constants57
▷ Global constants712.28%
▷ Class constants5087.72%
▷ Public constants50100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/sm-white@2x.png7.77KB4.03KB▼ 48.07%
images/sm-new.png11.48KB4.79KB▼ 58.29%
images/sm-tiny.png3.62KB2.44KB▼ 32.48%