77% wp-twitter-cards-shop

Code Review | WP Twitter Cards Shop

WordPress plugin WP Twitter Cards Shop scored77%from 54 tests.

About plugin

  • Plugin page: wp-twitter-cards-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 11, 2014
  • Latest release: Sep 13, 2014
  • Number of updates: 22
  • Update frequency: every 0.1 days
  • Top authors: dylanirzi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /945 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.01MB] [CPU: ▼4.24ms] Passed 4 tests

Analyzing server-side resources used by WP Twitter Cards Shop
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.39 ▼0.0726.88 ▼13.59
Dashboard /wp-admin3.31 ▲0.0150.30 ▲0.98
Posts /wp-admin/edit.php3.36 ▲0.0144.49 ▼1.51
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.99 ▼2.77
Media Library /wp-admin/upload.php3.24 ▲0.0133.57 ▲0.91
WP Twitter Cards Shop /wp-admin/options-general.php?page=twitter-cards-option3.1829.86

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: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Twitter Cards Shop
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲9713.62 ▼0.751.69 ▼0.0843.00 ▼7.79
Dashboard /wp-admin2,210 ▲224.85 ▼0.03104.79 ▼14.1642.15 ▼5.38
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0734.90 ▼2.3133.23 ▲0.10
Add New Post /wp-admin/post-new.php1,540 ▲718.14 ▼5.03609.88 ▼62.9354.20 ▼12.30
Media Library /wp-admin/upload.php1,392 ▲14.25 ▲0.00100.57 ▼3.2842.54 ▼2.12
WP Twitter Cards Shop /wp-admin/options-general.php?page=twitter-cards-option7972.0328.6528.72

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=twitter-cards-option
    • > Notice in wp-content/plugins/wp-twitter-cards-shop/twitter-class.php+31
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-twitter-cards-shop/twittercards.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-twitter-cards-shop/twitter-class.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: twitter cards, products, cards, shop, twitter

wp-twitter-cards-shop/twittercards.php 69% from 13 tests

This is the main PHP file of "WP Twitter Cards Shop" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-twitter-cards-shop.php" instead of "twittercards.php")
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin78 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2223678

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin