10% dadi-shal

Code Review | Dadi Shal

WordPress plugin Dadi Shal scored10%from 54 tests.

About plugin

  • Plugin page: dadi-shal
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jan 5, 2017
  • Latest release: Jan 5, 2017
  • Number of updates: 20
  • Update frequency: N/A
  • Top authors: davidemura (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /587 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure had errors
    • > Notice in wp-content/plugins/dadi-shal/share-from-post-list.php+336
    Undefined index: post_type

Server metrics [RAM: ▼1.77MB] [CPU: ▼53.92ms] Passed 4 tests

This is a short check of server-side resources used by Dadi Shal
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.21 ▼1.255.54 ▼34.47
Dashboard /wp-admin2.23 ▼1.077.79 ▼43.62
Posts /wp-admin/edit.php2.23 ▼1.127.34 ▼44.92
Add New Post /wp-admin/post-new.php2.23 ▼3.657.17 ▼92.68
Media Library /wp-admin/upload.php2.23 ▼0.995.76 ▼31.45
Dadi Shal /wp-admin/options-general.php?page=dadishal-options-page2.236.72

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 16 new options
New WordPress options
enable_googleplus
widget_theysaidso_widget
can_compress_scripts
db_upgraded
display_buttons_on_list_posts
open_window
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
display_buttons_on_list_pages
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Dadi Shal
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲3714.48 ▲0.191.79 ▼0.2243.84 ▼0.68
Dashboard /wp-admin2,217 ▲295.84 ▲1.01105.98 ▼6.5340.96 ▼2.11
Posts /wp-admin/edit.php2,115 ▲262.01 ▼0.0235.59 ▼5.5937.20 ▲1.41
Add New Post /wp-admin/post-new.php1,521 ▼2123.09 ▲4.81671.45 ▲32.9455.72 ▲0.07
Media Library /wp-admin/upload.php1,396 ▲114.24 ▲0.0595.80 ▼13.3143.65 ▼3.58
Dadi Shal /wp-admin/options-general.php?page=dadishal-options-page9671.7225.7331.47

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
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/dadi-shal/share-from-post-list.php+336
    Undefined index: post_type
  • Zombie WordPress options detected upon uninstall: 16 options
    • enable_linkedin
    • enable_googleplus
    • widget_recent-posts
    • theysaidso_admin_options
    • enable_pinterest
    • twitter_username
    • enable_twitter
    • open_window
    • can_compress_scripts
    • display_buttons_on_list_posts
    • ...

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=dadishal-options-page
    • > Notice in wp-content/plugins/dadi-shal/share-from-post-list.php+446
    Undefined index: post_type

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
There were not plugin tags detected

dadi-shal/share-from-post-list.php 92% from 13 tests

"Dadi Shal" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dadi-shal.php" instead of "share-from-post-list.php")

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 detected2,581 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
HTML21601,410
CSS21012563
PHP266107330
SVG110177
PO File1283582
Markdown110019

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.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
4 PNG files occupy 0.36MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png6.05KB2.86KB▼ 52.64%
assets/screenshot-1.png259.13KB42.80KB▼ 83.48%
assets/banner-772x250.png92.71KB12.62KB▼ 86.39%
assets/icon-256x256.png8.12KB3.90KB▼ 51.96%