79% content-cards

Code Review | Content Cards

WordPress plugin Content Cards scored 79% from 54 tests.

About plugin

  • Plugin page: content-cards
  • Plugin version: 0.9.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 1, 2015
  • Latest release: Feb 8, 2018
  • Number of updates: 37
  • Update frequency: every 24.2 days
  • Top authors: deployer (86.49%)ideag (10.81%)khromov (8.11%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active / 23,464 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.28MB] [CPU: ▼0.07ms] Passed 4 tests

A check of server-side resources used by Content Cards
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2644.57 ▲2.75
Dashboard /wp-admin3.57 ▲0.2754.50 ▲1.87
Posts /wp-admin/edit.php3.68 ▲0.3349.13 ▼3.04
Add New Post /wp-admin/post-new.php6.43 ▲0.5587.88 ▼0.12
Media Library /wp-admin/upload.php3.49 ▲0.2637.33 ▲0.99
Content Cards /wp-admin/options-general.php?page=content-cards-settings3.4936.96

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Content Cards
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.20 ▼1.441.78 ▼0.1643.20 ▼0.14
Dashboard /wp-admin2,210 ▲225.85 ▲0.92112.31 ▲9.3642.98 ▼3.52
Posts /wp-admin/edit.php2,093 ▲42.05 ▼0.0037.27 ▼5.7034.71 ▼3.69
Add New Post /wp-admin/post-new.php1,529 ▲1217.72 ▲0.01662.20 ▼78.4857.83 ▼1.15
Media Library /wp-admin/upload.php1,395 ▲74.31 ▲0.0995.74 ▼20.2139.83 ▼8.17
Content Cards /wp-admin/options-general.php?page=content-cards-settings1,0773.2150.3138.32

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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
Good news, no errors were detected

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
Please take a closer look at the following
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_cc_css_classes() in wp-content/plugins/content-cards/skins/default-dark/content-cards.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function the_cc_css_classes() in wp-content/plugins/content-cards/skins/default/content-cards.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/content-cards/content-cards.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=content-cards-settings
    • > Network (severe)
    wp-content/plugins/content-cards/content-cards-upload.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: open graph, link cards, rich snippet, snippet, content card...

content-cards/content-cards.php Passed 13 tests

The entry point to "Content Cards" version 0.9.7 is a PHP file that has certain tags in its header comment area
62 characters long description:
Embed any link from the web easily as a beautiful Content Card

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
Good job! No executable or dangerous file extensions detected1,663 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP41213061,289
CSS54812207
JavaScript369167

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity63.33
▷ Minimum class complexity28.00
▷ Maximum class complexity115.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods72
▷ Static methods4765.28%
▷ Public methods5272.22%
▷ Protected methods00.00%
▷ Private methods2027.78%
Functions6
▷ Named functions6100.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
3 PNG files occupy 0.06MB with 0.06MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
skins/default-dark/content-cards-placeholder.png23.75KB2.38KB▼ 89.97%
skins/default/content-cards-placeholder.png20.89KB1.93KB▼ 90.77%
content-cards-button.png19.94KB0.87KB▼ 95.64%