88% w-dalil

Code Review | W-DALIL

WordPress plugin W-DALIL scored 88% from 54 tests.

About plugin

  • Plugin page: w-dalil
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.4
  • WordPress version: 5.9.2
  • First release: Jan 29, 2016
  • Latest release: May 25, 2016
  • Number of updates: 33
  • Update frequency: every 3.6 days
  • Top authors: iyas0s (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 984 total downloads

Benchmarks

Plugin footprint Passed 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.20MB] [CPU: ▼294.37ms] Passed 4 tests

This is a short check of server-side resources used by W-DALIL
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.1844.56 ▼9.03
Dashboard /wp-admin3.65 ▲0.2533.29 ▲1.47
Posts /wp-admin/edit.php3.88 ▲0.2445.28 ▲8.67
Add New Post /wp-admin/post-new.php7.12 ▲0.1593.63 ▼1,170.26
Media Library /wp-admin/upload.php3.54 ▲0.2424.79 ▲0.36
Dalil Cities /wp-admin/edit-tags.php?taxonomy=dalil_city&post_type=dalil3.5425.77
Widgets /wp-admin/widgets.php5.4658.89
View Dalil Items /wp-admin/edit.php?post_type=dalil3.6425.33
FW Dalil /wp-admin/options-general.php?page=fw-dalil3.4820.81
Add New Dalil item /wp-admin/post-new.php?post_type=dalil3.8143.23
Menus /wp-admin/nav-menus.php3.9033.93
Dalil Categories /wp-admin/edit-tags.php?taxonomy=dalil_cat&post_type=dalil3.5425.60

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for W-DALIL
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,890 ▲16815.93 ▲0.606.22 ▲0.612.58 ▲0.17
Dashboard /wp-admin2,954 ▲1036.17 ▼0.00115.05 ▼17.75154.00 ▼7.36
Posts /wp-admin/edit.php2,753 ▲593.25 ▲0.0165.33 ▲2.73138.73 ▼2.76
Add New Post /wp-admin/post-new.php1,712 ▲117.93 ▼3.39394.47 ▼68.18156.76 ▲1.08
Media Library /wp-admin/upload.php1,760 ▲595.54 ▲0.07144.41 ▲3.59178.38 ▼6.94
Dalil Cities /wp-admin/edit-tags.php?taxonomy=dalil_city&post_type=dalil1,6762.7754.24108.99
Widgets /wp-admin/widgets.php2,59825.56578.47185.43
View Dalil Items /wp-admin/edit.php?post_type=dalil1,4332.9259.22111.38
FW Dalil /wp-admin/options-general.php?page=fw-dalil1,0912.3752.37107.02
Add New Dalil item /wp-admin/post-new.php?post_type=dalil2,3304.0296.67151.52
Menus /wp-admin/nav-menus.php2,4103.2581.10135.50
Dalil Categories /wp-admin/edit-tags.php?taxonomy=dalil_cat&post_type=dalil1,6842.7755.78116.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=fw-dalil
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=fw-dalil
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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 fix the following
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/w-dalil/includes/w-dalil-shortcodes.php:2
    • > PHP Warning
      include_once(DALIL_INCLUDESw-dalil-get-informatrion.php): failed to open stream: No such file or directory in wp-content/plugins/w-dalil/includes/w-dalil-functions.php on line 2
    • > PHP Warning
      include_once(): Failed opening 'DALIL_INCLUDESw-dalil-get-informatrion.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/w-dalil/includes/w-dalil-functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/w-dalil/includes/w-dalil-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/w-dalil/w-dalil.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/w-dalil/includes/w-dalil-init.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/w-dalil/includes/w-dalil-metabox.php:2
    • > PHP Warning
      Use of undefined constant DALIL_INCLUDES - assumed 'DALIL_INCLUDES' (this will throw an Error in a future version of PHP) in wp-content/plugins/w-dalil/includes/w-dalil-functions.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/w-dalil/includes/w-dalil-functions.php:27

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

readme.txt 88% 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:
  • Donate link: Please fix this invalid url: ""
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

w-dalil/w-dalil.php 92% from 13 tests

Analyzing the main PHP file in "W-DALIL" version 2.0
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin1,598 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP72551011,204
PO File28797196
CSS120148
SVG10050

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.50
▷ Minimum class complexity6.00
▷ Maximum class complexity33.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods433.33%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/file/print_logo.png14.40KB7.42KB▼ 48.45%