73% shortcode-gallery-for-matterport-showcase

Code Review | WP Matterport Shortcode

WordPress plugin WP Matterport Shortcode scored73%from 54 tests.

About plugin

  • Plugin page: shortcode-gallery...
  • Plugin version: 2.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2016
  • Latest release: Sep 21, 2023
  • Number of updates: 170
  • Update frequency: every 16.5 days
  • Top authors: AntiochInteractive (95.88%)mpembed (4.71%)

Code review

54 tests

User reviews

9 reviews

Install metrics

4,000+ active /36,067 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼2.86ms] Passed 4 tests

Analyzing server-side resources used by WP Matterport Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.39 ▼0.72
Dashboard /wp-admin3.41 ▲0.1146.76 ▼5.52
Posts /wp-admin/edit.php3.46 ▲0.1044.43 ▼0.69
Add New Post /wp-admin/post-new.php5.99 ▲0.1085.66 ▼4.49
Media Library /wp-admin/upload.php3.33 ▲0.1036.38 ▲1.59

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 17 new files
Database: 1 new table, 7 new options
New tables
wp_wpms
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
wpms_db_version
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Matterport Shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲18214.02 ▼0.286.56 ▲4.7237.20 ▼7.21
Dashboard /wp-admin2,224 ▲334.93 ▲0.0799.43 ▼5.5069.02 ▲30.19
Posts /wp-admin/edit.php2,107 ▲181.98 ▼0.0133.54 ▼2.3035.00 ▲2.47
Add New Post /wp-admin/post-new.php1,531 ▲1123.00 ▼0.04716.34 ▲32.3557.49 ▼1.20
Media Library /wp-admin/upload.php1,397 ▲94.12 ▼0.25110.56 ▲5.2444.85 ▲2.05

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_wpms
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • wpms_db_version
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shortcode-gallery-for-matterport-showcase/wp-matterport.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shortcode-gallery-for-matterport-showcase/wp-matterport-admin.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% 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
2 plugin tags: shortcode, matterport

shortcode-gallery-for-matterport-showcase/wp-matterport.php 77% from 13 tests

"WP Matterport Shortcode" version 2.1.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shortcode-gallery-for-matterport-showcase.php" instead of "wp-matterport.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 146 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Everything looks great! No dangerous files found in this plugin1,060 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP48689592
CSS2428415
PO File34030
JavaScript21223

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.08
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
wpms-icon.png1.53KB0.66KB▼ 56.77%