84% lh-twitter-meta-tags

Code Review | LH Twitter Meta Tags

WordPress plugin LH Twitter Meta Tags scored 84% from 54 tests.

About plugin

  • Plugin page: lh-twitter-meta-tags
  • Plugin version: 1.21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 31, 2015
  • Latest release: Aug 8, 2022
  • Number of updates: 6
  • Update frequency: every 403.7 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,021 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

A check of server-side resources used by LH Twitter Meta Tags
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.19 ▼3.51
Dashboard /wp-admin3.35 ▲0.0544.25 ▼5.61
Posts /wp-admin/edit.php3.46 ▲0.1147.69 ▲2.33
Add New Post /wp-admin/post-new.php5.93 ▲0.0597.45 ▲6.33
Media Library /wp-admin/upload.php3.27 ▲0.0533.02 ▲1.15

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by LH Twitter Meta Tags
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.18 ▼1.111.76 ▼0.0440.04 ▼12.13
Dashboard /wp-admin2,206 ▲155.05 ▼0.82110.61 ▲8.6038.18 ▼0.90
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0439.47 ▼1.9034.64 ▼2.85
Add New Post /wp-admin/post-new.php1,533 ▲1623.41 ▲5.63630.30 ▼32.4248.13 ▼5.54
Media Library /wp-admin/upload.php1,391 ▲34.21 ▲0.0499.43 ▼1.4142.95 ▲0.01

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function single_post_title() in wp-content/plugins/lh-twitter-meta-tags/partials/standard.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lh-twitter-meta-tags/lh-twitter-meta-tags.php:325
    • > PHP Fatal error
      Uncaught Error: Call to undefined function single_post_title() in wp-content/plugins/lh-twitter-meta-tags/partials/gallery.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% 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 cards, twitter, meta, meta tags

lh-twitter-meta-tags/lh-twitter-meta-tags.php 92% from 13 tests

The principal PHP file in "LH Twitter Meta Tags" v. 1.21 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected204 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP317122204

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods26
▷ Static methods1661.54%
▷ Public methods26100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin