84% unitydog

Code Review | UnityDog

WordPress plugin UnityDog scored84%from 54 tests.

About plugin

  • Plugin page: unitydog
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: May 15, 2013
  • Latest release: May 15, 2013
  • Number of updates: 10
  • Update frequency: N/A
  • Top authors: garrynewman (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

300+ active /8,450 total downloads

Benchmarks

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

A check of server-side resources used by UnityDog
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.66 ▲2.26
Dashboard /wp-admin3.32 ▲0.0252.83 ▼5.80
Posts /wp-admin/edit.php3.37 ▲0.0254.38 ▲2.44
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.94 ▼5.44
Media Library /wp-admin/upload.php3.25 ▲0.0240.33 ▲2.68

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for UnityDog
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲16613.42 ▼0.938.44 ▲6.9041.63 ▼1.49
Dashboard /wp-admin2,192 ▲185.56 ▼0.0386.79 ▼4.0441.21 ▼1.26
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0336.18 ▼9.6235.25 ▼8.23
Add New Post /wp-admin/post-new.php1,526 ▼523.06 ▲0.02721.88 ▲100.9351.25 ▼14.23
Media Library /wp-admin/upload.php1,399 ▼14.13 ▼0.05101.75 ▼4.6546.63 ▲3.87

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/unitydog/unitydog.php:20

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 97% from 29 tests

readme.txt 94% 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:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

unitydog/unitydog.php Passed 13 tests

The main PHP file in "UnityDog" ver. 1.0.4 adds more information about the plugin and also serves as the entry point for this plugin
67 characters long description:
Unitydog enabled embedding of unity3d webplayer files in your blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin211 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
CSS118785
JavaScript218363
PHP1203163

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions7
▷ Named functions7100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
play.png0.50KB0.39KB▼ 21.85%
ctrl_restore.png0.41KB0.30KB▼ 25.71%
ctrl_fullscreen.png0.17KB0.15KB▼ 7.65%