84% drim-share

Code Review | DR!M Share

WordPress plugin DR!M Share scored84%from 54 tests.

About plugin

  • Plugin page: drim-share
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.3
  • WordPress version: 6.3.1
  • First release: Nov 12, 2017
  • Latest release: Oct 31, 2019
  • Number of updates: 10
  • Update frequency: every 71.8 days
  • Top authors: drimio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /938 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲0.48ms] Passed 4 tests

A check of server-side resources used by DR!M Share
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2039.79 ▼3.40
Dashboard /wp-admin3.59 ▲0.2951.32 ▼0.24
Posts /wp-admin/edit.php3.64 ▲0.2954.11 ▲2.75
Add New Post /wp-admin/post-new.php6.13 ▲0.24111.82 ▲12.82
Media Library /wp-admin/upload.php3.45 ▲0.2240.14 ▲2.83

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 43 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by DR!M Share
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10713.21 ▼1.444.93 ▲3.3142.76 ▼1.98
Dashboard /wp-admin2,235 ▲474.92 ▼0.98112.66 ▲8.2040.98 ▲1.08
Posts /wp-admin/edit.php2,118 ▲292.06 ▲0.0641.56 ▲0.7534.81 ▼2.48
Add New Post /wp-admin/post-new.php1,539 ▲2023.27 ▲0.03676.67 ▼10.8758.18 ▼8.58
Media Library /wp-admin/upload.php1,408 ▲204.26 ▲0.0398.56 ▼19.8948.46 ▲1.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Drim_Share' not found in wp-content/plugins/drim-share/admin/partials/drim-share-admin-display-sidebar.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drim-share/admin/inc/svg-functions.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drim-share/admin/inc/svg-functions.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/drim-share/admin/partials/drim-share-settings-link.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/drim-share/admin/partials/drim-share-admin-functions.php:710
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/drim-share/admin/inc/svg-functions.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/drim-share/admin/partials/drim-share-settings-fields.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/drim-share/admin/partials/class-drim-share-options.php:682

User-side errors Passed 1 test

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

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
Attributes that require attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3 in drim-share/assets to your readme.txt
You can take inspiration from this readme.txt

drim-share/drim-share.php Passed 13 tests

Analyzing the main PHP file in "DR!M Share" version 1.2.0
63 characters long description:
A simple lightweight and mobile friendly social sharing plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected4,054 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
PHP226941,6591,958
JavaScript23271261,155
CSS31816569
PO File19595219
Markdown128094
SVG10052
XML1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity19.78
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods94
▷ Static methods1111.70%
▷ Public methods8792.55%
▷ Protected methods22.13%
▷ Private methods55.32%
Functions38
▷ Named functions3694.74%
▷ Anonymous functions25.26%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.62MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/ds_fixed_mobile.png107.72KB31.34KB▼ 70.91%
admin/assets/images/ds_full_mobile.png107.38KB31.06KB▼ 71.07%
admin/assets/images/ds_in_content.png163.53KB61.87KB▼ 62.17%
admin/assets/images/ds_in_content_mobile.png107.25KB30.93KB▼ 71.16%
admin/assets/images/ds_fixed.png146.86KB44.35KB▼ 69.80%