73% ubecube-3d-widget

Code Review | Ubecube 3D

WordPress plugin Ubecube 3D scored 73% from 54 tests.

About plugin

  • Plugin page: ubecube-3d-widget
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.7.1
  • WordPress version: 6.3.1
  • First release: Jul 16, 2013
  • Latest release: Nov 24, 2013
  • Number of updates: 14
  • Update frequency: every 9.4 days
  • Top authors: JacopoG (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,704 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.68MB] [CPU: ▼50.36ms] Passed 4 tests

A check of server-side resources used by Ubecube 3D
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.31 ▼1.159.71 ▼33.88
Dashboard /wp-admin2.32 ▼0.9814.67 ▼38.88
Posts /wp-admin/edit.php2.33 ▼1.0311.57 ▼41.69
Add New Post /wp-admin/post-new.php2.32 ▼3.5612.00 ▼86.99
Media Library /wp-admin/upload.php2.32 ▼0.9012.53 ▼22.37

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_ju3d
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Ubecube 3D
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲8614.81 ▲0.063.63 ▲1.2639.75 ▼6.37
Dashboard /wp-admin2,206 ▲155.88 ▼0.00101.19 ▼3.2239.31 ▼8.16
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0239.32 ▲3.3536.09 ▲1.67
Add New Post /wp-admin/post-new.php1,536 ▲223.14 ▲0.13667.13 ▲69.2953.46 ▼9.92
Media Library /wp-admin/upload.php1,382 ▼64.19 ▼0.0396.93 ▲1.4043.27 ▲1.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in ubecube_3d is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_ju3d
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Wp_Widget' not found in wp-content/plugins/ubecube-3d-widget/ubecube_3d.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Screenshots: Add images for these screenshots: #1 (Ubecube 3D.), #2 (Mouse over the cube.), #3 (Rotation.), #4 (Administrator's panel.), #5 (No 3D mode (IE 10).)
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

ubecube-3d-widget/ubecube_3d.php 92% from 13 tests

The entry point to "Ubecube 3D" version 1.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ubecube-3d-widget.php" instead of "ubecube_3d.php")

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
Success! There were no dangerous files found in this plugin640 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS15530247
JavaScript213267193
PHP19433175
PO File15525

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity4.00
▷ Maximum class complexity8.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png17.35KB9.32KB▼ 46.28%
screenshot-5.png5.07KB2.55KB▼ 49.64%
img/transparent.png0.90KB0.09KB▼ 89.72%
screenshot-1.png4.54KB2.36KB▼ 48.10%
img/buttons-60x316.png2.41KB0.79KB▼ 67.41%