10% dd-twitter-widget

Code Review | DD-Twitter

WordPress plugin DD-Twitter scored 10% from 53 tests.

About plugin

  • Plugin page: dd-twitter-widget
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.9
  • WordPress version: 5.8.1
  • First release: Nov 19, 2013
  • Latest release: Apr 19, 2014
  • Number of updates: 13
  • Update frequency: every 11.6 days
  • Top authors: Mosterd3d (100%)

Code review

53 tests

User reviews

1 review

Install metrics

10+ active / 656 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/dd-twitter-widget/inc/widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; dd_twitter has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼314.80ms] Passed 4 tests

Analyzing server-side resources used by DD-Twitter
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /1.81 ▼0.915.15 ▼20.64
Dashboard /wp-admin1.83 ▼1.225.52 ▼35.49
Posts /wp-admin/edit.php1.83 ▼1.276.32 ▼41.51
Add New Post /wp-admin/post-new.php1.83 ▼3.605.90 ▼1,146.18
Media Library /wp-admin/upload.php1.83 ▼1.175.84 ▼36.03

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 1 new option
New WordPress options
widget_dd_twitter

Browser metrics Passed 4 tests

A check of browser resources used by DD-Twitter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,685 ▲8115.88 ▲0.318.66 ▼0.5748.51 ▼4.33
Dashboard /wp-admin2,966 ▲1165.94 ▲0.10134.15 ▼1.77104.93 ▼6.28
Posts /wp-admin/edit.php2,713 ▲102.69 ▼0.0069.99 ▲3.2494.39 ▲5.40
Add New Post /wp-admin/post-new.php1,658 ▲518.47 ▼0.39364.70 ▼31.35107.43 ▲2.38
Media Library /wp-admin/upload.php1,782 ▲75.02 ▲0.02158.30 ▲1.77105.51 ▼4.35
DD Twitter /wp-admin/dd-twitter.php260.900.0911.27

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/dd-twitter-widget/inc/widget.php+9
    Methods with the same name as their class will not be constructors in a future version of PHP; dd_twitter has a deprecated constructor
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_dd_twitter

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dd-twitter-widget/inc/setting_page.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dd-twitter-widget/inc/widget.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dd-twitter-widget/inc/setting_page.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following browser errors
    • > GET request to /wp-admin/dd-twitter.php
    • > Network (severe)
    wp-admin/dd-twitter.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #3 (screenshot-3.png), #4 (screenshot-5.png)
You can look at the official readme.txt

dd-twitter-widget/dd_twitter.php 92% from 13 tests

"DD-Twitter" version 2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("dd-twitter-widget.php" instead of "dd_twitter.php")

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
There were no executable files found in this plugin917 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5225356873
SVG10036
CSS1108

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.62
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes215.38%
▷ Concrete classes1184.62%
▷ Final classes00.00%
Methods80
▷ Static methods1012.50%
▷ Public methods6986.25%
▷ Protected methods22.50%
▷ Private methods911.25%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected