83% dd-business-card-widget

Code Review | DD - Business Card Widget

WordPress plugin DD - Business Card Widget scored83%from 54 tests.

About plugin

  • Plugin page: dd-business-card-...
  • Plugin version: 1.4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.4.0
  • WordPress version: 6.3.1
  • First release: Nov 5, 2015
  • Latest release: Nov 23, 2015
  • Number of updates: 14
  • Update frequency: every 1.5 days
  • Top authors: deh3nne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,109 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.61ms] Passed 4 tests

Analyzing server-side resources used by DD - Business Card Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.35 ▼4.10
Dashboard /wp-admin3.36 ▲0.0248.12 ▼18.57
Posts /wp-admin/edit.php3.48 ▲0.1253.87 ▲4.32
Add New Post /wp-admin/post-new.php5.94 ▲0.0697.29 ▼1.36
Media Library /wp-admin/upload.php3.29 ▲0.0637.16 ▼2.41

Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
These are issues you should consider
  • Illegal file modification detected: 1 file (4.00KB) outside of "wp-content/plugins/dd-business-card-widget/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 9 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_ddbw
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by DD - Business Card Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.25 ▼0.931.70 ▼0.0243.35 ▼2.94
Dashboard /wp-admin2,218 ▲155.81 ▲0.9497.55 ▼14.4436.70 ▼3.33
Posts /wp-admin/edit.php2,100 ▼02.01 ▼0.0139.21 ▼1.7535.89 ▼1.04
Add New Post /wp-admin/post-new.php1,526 ▼1917.43 ▼5.76638.49 ▼31.9366.17 ▲13.45
Media Library /wp-admin/upload.php1,400 ▲34.16 ▼0.0996.62 ▼12.5644.42 ▼4.39

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_ddbw
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dd-business-card-widget/ddbusinesswidget.widget.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dd-business-card-widget/ddbusinesswidget.php:29

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === dd-business-card-widget === )
You can take inspiration from this readme.txt

dd-business-card-widget/ddbusinesswidget.php 77% from 13 tests

The entry point to "DD - Business Card Widget" version 1.4.2 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("dd-business-card-widget.php" instead of "ddbusinesswidget.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 204 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin807 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4138122531
PO File14654127
CSS12310110
JavaScript114839

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity29.50
▷ Minimum class complexity3.00
▷ Maximum class complexity56.00
Average method complexity7.22
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin