73% mtphr-shortcodes

Code Review | Metaphor Shortcodes

WordPress plugin Metaphor Shortcodes scored73%from 54 tests.

About plugin

  • Plugin page: mtphr-shortcodes
  • Plugin version: 2.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 6.3.1
  • First release: Mar 11, 2013
  • Latest release: Aug 20, 2020
  • Number of updates: 76
  • Update frequency: every 35.8 days
  • Top authors: metaphorcreations (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

700+ active /29,661 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.33MB] [CPU: ▼5.90ms] Passed 4 tests

An overview of server-side resources used by Metaphor Shortcodes
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1744.00 ▼13.61
Dashboard /wp-admin3.68 ▲0.3853.68 ▲1.65
Posts /wp-admin/edit.php3.80 ▲0.4452.78 ▲2.36
Add New Post /wp-admin/post-new.php6.28 ▲0.4091.92 ▼8.74
Media Library /wp-admin/upload.php3.61 ▲0.3839.19 ▼2.90
Metaphor Shortcodes /wp-admin/plugins.php?page=mtphr_shortcodes_settings3.5635.34

Server storage [IO: ▲2.26MB] [DB: ▲0.03MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for Metaphor Shortcodes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,954 ▲19313.98 ▼0.419.37 ▲7.4143.26 ▼9.06
Dashboard /wp-admin2,244 ▲414.95 ▼0.95128.20 ▲26.7544.04 ▲2.88
Posts /wp-admin/edit.php2,125 ▲252.26 ▲0.2538.00 ▲1.3634.56 ▲0.26
Add New Post /wp-admin/post-new.php1,610 ▲7817.82 ▼5.44661.75 ▼76.3348.80 ▼6.04
Media Library /wp-admin/upload.php1,423 ▲204.34 ▲0.09102.85 ▼15.8143.50 ▼9.58
Metaphor Shortcodes /wp-admin/plugins.php?page=mtphr_shortcodes_settings1,1442.2329.3141.42

Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 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 9 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • mtphr_shortcodes_version
    • theysaidso_admin_options
    • mtphr_shortcodes_icon_groups
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • mtphr_shortcodes_settings

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/plugins.php?page=mtphr_shortcodes_settings
    • > Warning in wp-content/plugins/mtphr-shortcodes/includes/admin/scripts.php+13
    filemtime(): stat failed for wp-content/plugins/mtphr-shortcodes/includes/metaboxer/metaboxer.css

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
Almost there! Just fix the following items
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/generators/tab.php:63
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/settings.php:93
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/fontastic.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/generators/slide-graph.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/scripts.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mtphr-shortcodes/mtphr-shortcodes.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/generators/pricing-table.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/generator.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/generators/grid.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mtphr-shortcodes/includes/admin/generators/toggle.php:43

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/plugins.php?page=mtphr_shortcodes_settings
    • > Network (severe)
    wp-content/plugins/mtphr-shortcodes/includes/metaboxer/metaboxer.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: post blocks, posts, post sliders, shortcodes, pricing tables...

mtphr-shortcodes/mtphr-shortcodes.php Passed 13 tests

The main file in "Metaphor Shortcodes" v. 2.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
66 characters long description:
Includes Column Grids, Pricing Tables, Post Sliders & Post Blocks.

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
Success! There were no dangerous files found in this plugin19,139 lines of code in 74 files:
LanguageFilesBlank linesComment linesLines of code
CSS91021145,295
HTML1403,297
SVG2103,084
PHP216173241,943
Sass1434341,768
LESS1434441,758
JavaScript103473191,228
PO File3354954766

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions58
▷ Named functions58100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/mtphr-shortcodes-icon-32.png1.16KB0.26KB▼ 77.26%
assets/images/mtphr-shortcodes-icon.png1.06KB0.20KB▼ 80.87%
assets/images/mtphr-shortcodes-icon-14.png1.07KB0.21KB▼ 79.96%