10% 3d-presentation

Code Review | 3D Presentation

WordPress plugin 3D Presentation scored 10% from 54 tests.

About plugin

  • Plugin page: 3d-presentation
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Aug 4, 2012
  • Latest release: Aug 4, 2012
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: lpagg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 2,182 total downloads

Benchmarks

Plugin footprint 75% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/3d-presentation/impressjs-step.php+383
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼0.36MB] [CPU: ▼168.03ms] Passed 4 tests

Server-side resources used by 3D Presentation
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.0624.50 ▼0.12
Dashboard /wp-admin2.98 ▼0.0822.15 ▼18.49
Posts /wp-admin/edit.php3.07 ▼0.0421.92 ▼13.68
Add New Post /wp-admin/post-new.php4.12 ▼1.3237.54 ▼635.66
Media Library /wp-admin/upload.php3.02 ▲0.0219.96 ▼4.30
Add New Step /wp-admin/post-new.php?post_type=impressjsstep3.0025.92
3D Presentation /wp-admin/edit.php?post_type=impressjsstep3.2337.51
3D Presentation /wp-admin/options-general.php?page=3d-presentation/impressjs-step.php2.9317.72

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 1 new option
New WordPress options
lpg_impressjs_options

Browser metrics Passed 4 tests

An overview of browser requirements for 3D Presentation
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,714 ▲11315.94 ▲0.155.28 ▲0.5174.03 ▲1.77
Dashboard /wp-admin2,980 ▲846.23 ▲0.08114.41 ▼15.74182.65 ▲9.16
Posts /wp-admin/edit.php2,787 ▲473.13 ▼0.1063.88 ▼0.00138.22 ▲1.32
Add New Post /wp-admin/post-new.php3,776 ▲8318.80 ▲3.35428.06 ▼1.60166.44 ▼1.97
Media Library /wp-admin/upload.php1,800 ▲485.65 ▲0.08124.82 ▼15.51203.52 ▲17.65
Add New Step /wp-admin/post-new.php?post_type=impressjsstep3,14710.21194.04255.11
3D Presentation /wp-admin/edit.php?post_type=impressjsstep4,1182.9163.72143.16
3D Presentation /wp-admin/options-general.php?page=3d-presentation/impressjs-step.php1,3002.7454.89121.01

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/post-new.php?post_type=impressjsstep
    • > Notice in wp-content/plugins/3d-presentation/impressjs-step.php+306
    Undefined index: impressjs_meta_box_nonce
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=impressjsstep
    • > Notice in wp-content/plugins/3d-presentation/impressjs-step.php+238
    Undefined index: std
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=impressjsstep
    • > Notice in wp-content/plugins/3d-presentation/impressjs-step.php+238
    Undefined index: validation
    • > GET request to /wp-admin/options-general.php?page=3d-presentation/impressjs-step.php
    • > Notice in wp-content/plugins/3d-presentation/impressjs-step.php+115
    Undefined index: post_type

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
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/3d-presentation/impressjs-presentation.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/3d-presentation/impressjs-overview.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/3d-presentation/single-impressjsstep.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/3d-presentation/impressjs-step.php:32

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=3d-presentation/impressjs-step.php
    • > Network (severe)
    wp-content/plugins/js/myvalidate.js?ver=5.8.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/post-new.php?post_type=impressjsstep
    • > Network (severe)
    http://localhost/mz/index.php?impressjsoverview=true#/overviewinedit - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Requires at least: Version not formatted correctly
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Setting Page), #2 (Editing Step Page)
Please take inspiration from this readme.txt

3d-presentation/impressjs-step.php 85% from 13 tests

The main PHP script in "3D Presentation" version 1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 267 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("3d-presentation.php" instead of "impressjs-step.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected2,688 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript32713541,435
PHP4196157893
CSS2128225360

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions26
▷ Named functions26100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
impressjs-icon32.png1.04KB0.91KB▼ 12.64%
screenshot-1.png18.61KB7.08KB▼ 61.98%
apple-touch-icon.png2.47KB1.95KB▼ 21.30%
screenshot-2.png33.88KB16.45KB▼ 51.44%
impressjs-icon16.png0.52KB0.52KB0.19%