94% dicom-viewer

Code Review | DICOMViewer

WordPress plugin DICOMViewer scored 94% from 54 tests.

About plugin

  • Plugin page: dicom-viewer
  • Plugin version: 0.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 5.8.1
  • First release: Dec 25, 2017
  • Latest release: Dec 27, 2017
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: redthreaddesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 955 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by DICOMViewer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.0223.53 ▲0.31
Dashboard /wp-admin3.07 ▲0.0130.25 ▼7.91
Posts /wp-admin/edit.php3.12 ▲0.0127.71 ▼1.96
Add New Post /wp-admin/post-new.php5.43 ▼0.0167.44 ▼568.40
Media Library /wp-admin/upload.php3.01 ▲0.0123.03 ▼1.01

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

DICOMViewer: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,848 ▲24617.96 ▲2.3629.32 ▲23.8877.84 ▲2.03
Dashboard /wp-admin2,934 ▲356.03 ▼0.04114.27 ▼18.17167.32 ▼5.94
Posts /wp-admin/edit.php2,747 ▲43.23 ▲0.0164.23 ▼1.79141.93 ▲5.33
Add New Post /wp-admin/post-new.php3,701 ▼3418.53 ▼0.36446.96 ▲28.79162.66 ▼5.36
Media Library /wp-admin/upload.php1,756 ▲75.53 ▲0.05138.81 ▼14.86179.18 ▼5.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/dicom-viewer/DICOMViewer.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: images, dcm, javascript, gallery, html5...

dicom-viewer/DICOMViewer.php 85% from 13 tests

The principal PHP file in "DICOMViewer" v. 0.1.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dicom-viewer.php" instead of "DICOMViewer.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 239 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,029 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript103738131,724
PHP14691211
Sass16065
CSS13816
SVG20013

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin