84% chart-card

Code Review | Chart Card

WordPress plugin Chart Card scored84%from 54 tests.

About plugin

  • Plugin page: chart-card
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9.3
  • WordPress version: 6.3.1
  • First release: May 25, 2022
  • Latest release: May 26, 2022
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: dufresnesteven (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /254 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▲0.16ms] Passed 4 tests

An overview of server-side resources used by Chart Card
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.44 ▲1.18
Dashboard /wp-admin3.33 ▲0.0348.76 ▲3.92
Posts /wp-admin/edit.php3.38 ▲0.0245.84 ▲1.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0382.34 ▼4.96
Media Library /wp-admin/upload.php3.25 ▲0.0236.30 ▲2.87

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Chart Card
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.27 ▼1.104.69 ▲3.1243.43 ▲1.41
Dashboard /wp-admin2,209 ▲204.86 ▼1.07103.52 ▼1.7942.12 ▲2.59
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0233.30 ▼7.8935.53 ▼1.58
Add New Post /wp-admin/post-new.php6,350 ▲4,81728.64 ▲5.33917.93 ▲252.0758.04 ▲6.89
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0093.35 ▼7.6246.12 ▲3.47

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WordPressdotorg\\Chart_Block\\add_action() in wp-content/plugins/chart-card/plugin.php:95

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: block, charts, stats

chart-card/plugin.php 85% from 13 tests

This is the main PHP file of "Chart Card" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("chart-card.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin6,247 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript22,2632,2956,088
PHP3112770
JSON10037
Markdown114029
CSS17123

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
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
Namespaces1
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%
Functions3
▷ Named functions3100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png0.72KB0.42KB▼ 41.89%
assets/icon-256x256.png1.28KB0.50KB▼ 60.52%