68% aritize-3d

Code Review | Nextech AR - ARitize 3D

WordPress plugin Nextech AR - ARitize 3D scored68%from 54 tests.

About plugin

  • Plugin page: aritize-3d
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jun 29, 2022
  • Latest release: Jul 26, 2023
  • Number of updates: 48
  • Update frequency: every 8.2 days
  • Top authors: nextechar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.59ms] Passed 4 tests

Analyzing server-side resources used by Nextech AR - ARitize 3D
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.14 ▲1.28
Dashboard /wp-admin3.31 ▼0.0446.41 ▼15.67
Posts /wp-admin/edit.php3.36 ▲0.0051.07 ▼2.95
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.66 ▼3.90
Media Library /wp-admin/upload.php3.23 ▲0.0037.73 ▲0.16

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 34 new files
Database: 1 new table, 6 new options
New tables
wp_aritize3d_api_keys
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Nextech AR - ARitize 3D: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.39 ▼0.131.65 ▼0.0348.50 ▲5.07
Dashboard /wp-admin2,195 ▲155.61 ▲0.0789.98 ▼9.1539.11 ▲2.13
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.1540.11 ▲0.5635.97 ▼3.57
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▲0.13676.76 ▼5.5769.02 ▲14.50
Media Library /wp-admin/upload.php1,397 ▼64.19 ▼0.0296.88 ▼15.7944.23 ▼1.56

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_aritize3d_api_keys
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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 0% 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/aritize-3d/aritize-3d.php
    • > /wp-content/plugins/aritize-3d/includes/front-end/aritize-3d-embed-button.php
  • 12× 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 esc_html() in wp-content/plugins/aritize-3d/includes/front-end/aritize-3d-embed-button.php:142
    • > PHP Warning
      Use of undefined constant ARITIZE3D_PLUGIN_DIR - assumed 'ARITIZE3D_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/aritize-3d/includes/admin/sections/custom-css.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/aritize-3d/includes/admin/settings.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aritize-3d/class.aritize-3d-core.php:90
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aritize-3d/class.aritize-3d-integration-cli.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/aritize-3d/includes/admin/sections/custom-css.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function aritize3d_get_token() in wp-content/plugins/aritize-3d/includes/admin/sections/api-tab.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/aritize-3d/includes/admin/aritize-3d.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/aritize-3d/integrations/aritize-3d-custom-css.php:14
    • > PHP Notice
      Undefined variable: meta_data in wp-content/plugins/aritize-3d/includes/front-end/aritize-3d-embed-button.php on line 100

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues 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
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #7, #8 in aritize-3d/assets to your readme.txt
Please take inspiration from this readme.txt

aritize-3d/aritize-3d.php 92% from 13 tests

"Nextech AR - ARitize 3D" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 179 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,668 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP272172261,525
CSS278143

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity8.15
▷ Minimum class complexity1.00
▷ Maximum class complexity31.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods71
▷ Static methods4461.97%
▷ Public methods6084.51%
▷ Protected methods68.45%
▷ Private methods57.04%
Functions12
▷ Named functions1083.33%
▷ Anonymous functions216.67%
Constants63
▷ Global constants1930.16%
▷ Class constants4469.84%
▷ Public constants44100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.69MB with 0.40MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/aritize-3d.png37.00KB13.91KB▼ 62.41%
assets/images/aritize_3d_bg.png673.36KB319.57KB▼ 52.54%