74% mazing-ar-shortcode

Code Review | Mazing AR Shortcode

WordPress plugin Mazing AR Shortcode scored74%from 54 tests.

About plugin

  • Plugin page: mazing-ar-shortcode
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Oct 27, 2021
  • Latest release: Apr 1, 2022
  • Number of updates: 5
  • Update frequency: every 31.4 days
  • Top authors: mazingxr (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /599 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▼7.42ms] Passed 4 tests

Analyzing server-side resources used by Mazing AR Shortcode
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.73 ▼1.66
Dashboard /wp-admin3.32 ▲0.0248.66 ▼2.66
Posts /wp-admin/edit.php3.37 ▲0.0243.77 ▼5.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0279.54 ▼19.94
Media Library /wp-admin/upload.php3.25 ▲0.0243.08 ▲12.35

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: 1 new table, 6 new options
New tables
wp_mazing_ar_shortcode
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Mazing AR Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,844 ▲9813.41 ▼0.971.99 ▲0.1344.30 ▲1.10
Dashboard /wp-admin2,214 ▲235.07 ▼0.79103.89 ▼1.0163.04 ▲24.58
Posts /wp-admin/edit.php2,103 ▲142.42 ▲0.4435.54 ▼7.0223.71 ▼11.45
Add New Post /wp-admin/post-new.php1,683 ▲16422.85 ▼0.53742.98 ▲71.9448.97 ▼11.02
Media Library /wp-admin/upload.php1,468 ▲774.43 ▲0.23125.49 ▲29.0273.65 ▲28.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mazing_ar_shortcode
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

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 take a closer look at the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/mazing-ar-shortcode/mazing-ar-shortcode.php:56
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/mazing-ar-shortcode/mazgar_displaylist.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/mazing-ar-shortcode/mazgar_displaylist.php:130

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: webar, 3d, augmented reality, shopping, ar

mazing-ar-shortcode/mazing-ar-shortcode.php Passed 13 tests

"Mazing AR Shortcode" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
75 characters long description:
Plugin to embed Mazing Augmented Reality Experiences to your website / shop

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin1,026 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP216724609
Markdown1720309
JavaScript223567
CSS210541

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png1.81KB0.36KB▼ 80.29%
img/copy.png0.48KB0.28KB▼ 40.57%
img/email.png0.64KB0.49KB▼ 23.04%
img/help.png0.73KB0.67KB▼ 8.47%
img/delete.png0.53KB0.67KB0.00%