51% delucks-seo

Code Review | DELUCKS SEO

WordPress plugin DELUCKS SEO scored51%from 54 tests.

About plugin

  • Plugin page: delucks-seo
  • Plugin version: 2.5.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-6.0
  • WordPress version: 6.3.1
  • First release: Apr 23, 2015
  • Latest release: Mar 13, 2023
  • Number of updates: 202
  • Update frequency: every 14.4 days
  • Top authors: deLucks (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

700+ active /37,642 total downloads

Benchmarks

Plugin footprint 48% 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: ▲1.79MB] [CPU: ▲23.48ms] Passed 4 tests

A check of server-side resources used by DELUCKS SEO
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.20 ▲1.7461.64 ▲20.43
Dashboard /wp-admin5.13 ▲1.7981.04 ▲21.48
Posts /wp-admin/edit.php5.17 ▲1.8176.33 ▲26.76
Add New Post /wp-admin/post-new.php7.74 ▲1.85117.35 ▲25.26
Media Library /wp-admin/upload.php5.05 ▲1.8363.15 ▲31.10
Dashboard /wp-admin/admin.php?page=dpc-dpc6.2162.66

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 483 new files
Database: 1 new table, 12 new options
New tables
wp_dpc_404_redirects
New WordPress options
widget_recent-comments
theysaidso_admin_options
dpc_status_dpc_wizard
dpc_license_last_check_ts
dpc_status_dpc_dashboard
widget_theysaidso_widget
dpc_dpc_dashboard
can_compress_scripts
dpc_status_dpc_importexport
widget_recent-posts
...

Browser metrics Passed 4 tests

DELUCKS SEO: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,980 ▲23414.08 ▼0.307.83 ▲6.1843.38 ▲0.61
Dashboard /wp-admin2,261 ▲735.00 ▲0.08100.15 ▼3.1579.08 ▲40.38
Posts /wp-admin/edit.php2,203 ▲1142.62 ▲0.5742.34 ▲1.5136.81 ▲0.13
Add New Post /wp-admin/post-new.php1,593 ▲7923.51 ▲6.05632.76 ▼58.9640.29 ▼19.76
Media Library /wp-admin/upload.php1,455 ▲644.39 ▲0.1699.29 ▼8.0675.94 ▲29.37
Dashboard /wp-admin/admin.php?page=dpc-dpc1,5873.9855.77137.36

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'dpc_uninstall' not found or invalid function name
  • Zombie tables were found after uninstall: 1 table
    • wp_dpc_404_redirects
  • Zombie WordPress options were found after uninstall: 12 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • dpc_dpc_dashboard
    • dpc_status_dpc_importexport
    • widget_recent-comments
    • dpc_version
    • can_compress_scripts
    • dpc_status_dpc_wizard
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These errors were triggered by the plugin
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dpc-dpc
    • > Notice in wp-content/plugins/delucks-seo/helper/functions.php+236
    Undefined index: professional_externallinks
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dpc-dpc
    • > Notice in wp-content/plugins/delucks-seo/helper/functions.php+236
    Undefined index: professional_microdata
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dpc-dpc
    • > Notice in wp-content/plugins/delucks-seo/helper/functions.php+236
    Undefined index: professional_rating
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dpc-dpc
    • > Notice in wp-content/plugins/delucks-seo/helper/functions.php+236
    Undefined index: professional_textopt
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=dpc-dpc
    • > Notice in wp-content/plugins/delucks-seo/helper/functions.php+236
    Undefined index: professional_sharing

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/delucks-seo/modules/basic/statistics/analytics-update.php
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/delucks-seo/modules/basic/metadata/widgets/description.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/delucks-seo/modules/basic/statistics/widgets/ga_opt_out.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function getModuleInstance() on null in wp-content/plugins/delucks-seo/modules/basic/sitemaps/inc/feed-sitemap-posttype.php:8
    • > PHP Fatal error
      Uncaught Error: Call to a member function getModuleInstance() on null in wp-content/plugins/delucks-seo/modules/basic/sitemaps/inc/feed-sitemap.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/delucks-seo/modules/professional/sharing/widgets/sharing.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'DPC_Module_Interface' not found in wp-content/plugins/delucks-seo/modules/basic/metadata/module.class.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/delucks-seo/modules/professional/rating/widgets/rating.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/delucks-seo/helper/uninstall.php:312
    • > PHP Fatal error
      Uncaught Error: Interface 'DPC_Module_Interface' not found in wp-content/plugins/delucks-seo/modules/professional/rating/module.class.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function getModuleInstance() on null in wp-content/plugins/delucks-seo/modules/basic/sitemaps/inc/feed-sitemap-news.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #2, #3, #4, #5, #6 in delucks-seo/assets to your readme.txt
You can take inspiration from this readme.txt

delucks-seo/index.php 77% from 13 tests

The primary PHP file in "DELUCKS SEO" version 2.5.4 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: The required version number must match the one declared in readme.txt ("4.6" instead of "2.0")
  • Description: Keep the plugin description shorter than 140 characters (currently 152 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("delucks-seo.php" instead of "index.php")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected79,736 lines of code in 322 files:
LanguageFilesBlank linesComment linesLines of code
CSS1202,78379536,331
JavaScript923,7943,02220,828
PHP522,6221,13115,136
XML183061023,037
LESS1553861,471
SVG7001,454
Sass1323241,256
JSON400154
Markdown150069

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 108)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity80.52
▷ Minimum class complexity1.00
▷ Maximum class complexity496.00
Average method complexity4.69
▷ Minimum method complexity1.00
▷ Maximum method complexity108.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods955
▷ Static methods60.63%
▷ Public methods93297.59%
▷ Protected methods151.57%
▷ Private methods80.84%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants31
▷ Global constants31100.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
96 PNG files occupy 0.48MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/iCheck/skins/flat/aero.png1.48KB1.66KB0.00%
assets/img/dpc-seo.png1.15KB0.38KB▼ 66.58%
assets/iCheck/skins/square/yellow.png2.08KB1.83KB▼ 12.06%
assets/iCheck/skins/line/line.png0.57KB0.79KB0.00%
assets/iCheck/skins/flat/blue@2x.png3.14KB2.79KB▼ 11.25%