10% deweys-twitter-card-helper

Code Review | Dewey's Twitter Card Helper

WordPress plugin Dewey's Twitter Card Helper scored 10% from 54 tests.

About plugin

  • Plugin page: deweys-twitter-ca...
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.5
  • WordPress version: 5.8.1
  • First release: Apr 23, 2015
  • Latest release: Dec 3, 2016
  • Number of updates: 12
  • Update frequency: every 77.5 days
  • Top authors: whatadewitt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 712 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'wad_twitter_cards' not found

Server metrics [RAM: ▼0.31MB] [CPU: ▼156.74ms] Passed 4 tests

An overview of server-side resources used by Dewey's Twitter Card Helper
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1539.55 ▲13.23
Dashboard /wp-admin3.09 ▲0.0452.70 ▼0.15
Posts /wp-admin/edit.php3.14 ▲0.0344.62 ▼5.39
Add New Post /wp-admin/post-new.php4.07 ▼1.3652.64 ▼622.33
Media Library /wp-admin/upload.php3.03 ▲0.0340.92 ▲0.91

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Dewey's Twitter Card Helper
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,713 ▲14115.92 ▼0.1011.08 ▲1.1150.47 ▼4.00
Dashboard /wp-admin2,967 ▲335.91 ▼0.00156.14 ▼5.65115.98 ▼6.14
Posts /wp-admin/edit.php2,739 ▼02.73 ▲0.0173.52 ▼16.8888.99 ▼15.80
Add New Post /wp-admin/post-new.php1,683 ▼1,89216.26 ▲1.39420.15 ▼144.30116.00 ▼7.01
Media Library /wp-admin/upload.php1,807 ▼05.01 ▲0.01162.22 ▼17.03125.76 ▲2.39

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+303
    call_user_func_array() expects parameter 1 to be a valid callback, class 'wad_twitter_cards' not found

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/deweys-twitter-card-helper/templates/twittercardform.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: twitter_desc in wp-content/plugins/deweys-twitter-card-helper/templates/twittercardform.php on line 23
    • > PHP Notice
      Undefined variable: twitter_type in wp-content/plugins/deweys-twitter-card-helper/templates/twittercardform.php on line 28
    • > PHP Notice
      Undefined variable: twitter_title in wp-content/plugins/deweys-twitter-card-helper/templates/twittercardform.php on line 18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: twitter, social, sharing, twitter cards

deweys-twitter-card-helper/wad_twitter_cards.php 85% from 13 tests

"Dewey's Twitter Card Helper" version 2.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("deweys-twitter-card-helper.php" instead of "wad_twitter_cards.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin158 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP547123151
CSS1007

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity3.86
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin