78% damaris

Code Review | Damaris RM

WordPress plugin Damaris RM scored 78% from 54 tests.

About plugin

  • Plugin page: damaris
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Oct 26, 2020
  • Latest release: Jan 18, 2021
  • Number of updates: 8
  • Update frequency: every 10.9 days
  • Top authors: damarisrm (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 353 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.30MB] [CPU: ▼2.93ms] Passed 4 tests

A check of server-side resources used by Damaris RM
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3342.30 ▲0.34
Dashboard /wp-admin3.63 ▲0.3346.65 ▼2.37
Posts /wp-admin/edit.php3.68 ▲0.3347.67 ▲1.80
Add New Post /wp-admin/post-new.php6.17 ▲0.2889.92 ▼11.49
Media Library /wp-admin/upload.php3.49 ▲0.2738.62 ▲6.67
Dashboard /wp-admin/admin.php?page=damaris_plugin3.4633.26
Settings /wp-admin/admin.php?page=damaris_settings3.4636.90
Shortcodes /wp-admin/admin.php?page=damaris_shortcodes3.4630.89

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 45 new files
Database: 1 new table, 6 new options
New tables
wp_damaris_rm_auth
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Damaris RM
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,951 ▲19414.08 ▼0.3411.43 ▲9.5439.96 ▼4.75
Dashboard /wp-admin2,241 ▲584.84 ▼0.06108.47 ▼0.4737.79 ▼5.45
Posts /wp-admin/edit.php2,124 ▲352.04 ▲0.0436.44 ▼6.4933.82 ▼0.39
Add New Post /wp-admin/post-new.php1,542 ▲2221.95 ▼1.41656.68 ▼3.0546.65 ▼8.60
Media Library /wp-admin/upload.php1,423 ▲354.23 ▼0.05100.96 ▲4.1943.37 ▲0.93
Dashboard /wp-admin/admin.php?page=damaris_plugin8232.0224.6630.18
Settings /wp-admin/admin.php?page=damaris_settings8222.0726.5124.05
Shortcodes /wp-admin/admin.php?page=damaris_shortcodes7932.1824.4825.77

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/damaris/damaris.php
    • > /wp-content/plugins/damaris/templates/shortcodes.php
    • > /wp-content/plugins/damaris/uninstall.php
    • > /wp-content/plugins/damaris/templates/simple-search.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Base/DRMWP_Shortcodes.php:14
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/damaris/templates/admin.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Base/DRMWP_SettingsLinks.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Base/DRMWP_Enqueue.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Api/DamarisRM_Callbacks/DRMWP_AdminCallbacks.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Pages/DRMWP_SettingsController.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Pages/DRMWP_SearchController.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/damaris/templates/settings.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'DamarisRM_Inc\\DamarisRM_Base\\DRMWP_BaseController' not found in wp-content/plugins/damaris/inc/DamarisRM_Pages/DRMWP_Dashboard.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (This screen shot description corresponds to screenshot-1.(png|jpg|jpeg|gif). Note that the screenshot is stored in the /assets directory.), #2 (This is the second screen shot)
You can look at the official readme.txt

damaris/damaris.php Passed 13 tests

"Damaris RM" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
47 characters long description:
This is a plugin for Damaris Record Management.

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
No dangerous file extensions were detected1,904 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP283163041,606
JavaScript2411172
CSS2104115
JSON20011

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.76
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity72.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes15.88%
Methods91
▷ Static methods88.79%
▷ Public methods8189.01%
▷ Protected methods00.00%
▷ Private methods1010.99%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.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 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/sort_desc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_asc_disabled.png0.14KB0.25KB0.00%
assets/images/sort_both.png0.20KB0.29KB0.00%
assets/images/sort_desc.png0.15KB0.25KB0.00%
assets/images/sort_asc.png0.16KB0.25KB0.00%