74% embed-charts

Code Review | Embed Charts

WordPress plugin Embed Charts scored74%from 54 tests.

About plugin

  • Plugin page: embed-charts
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Feb 27, 2021
  • Latest release: Feb 28, 2021
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: jamesdlow (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /721 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.87MB] [CPU: ▼31.62ms] Passed 4 tests

This is a short check of server-side resources used by Embed Charts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0544.06 ▲2.50
Dashboard /wp-admin3.08 ▼0.2322.20 ▼27.80
Posts /wp-admin/edit.php3.08 ▼0.2825.43 ▼21.38
Add New Post /wp-admin/post-new.php3.08 ▼2.8128.87 ▼67.18
Media Library /wp-admin/upload.php3.08 ▼0.1526.64 ▼10.10

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Embed Charts
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲4714.42 ▲0.071.76 ▲0.0442.11 ▼0.33
Dashboard /wp-admin2,214 ▲345.61 ▼0.0691.67 ▲0.2638.86 ▼6.75
Posts /wp-admin/edit.php2,116 ▲132.02 ▲0.0333.93 ▼1.6634.71 ▲1.96
Add New Post /wp-admin/post-new.php1,539 ▲1323.47 ▲0.33676.70 ▲6.0460.31 ▼8.94
Media Library /wp-admin/upload.php1,413 ▲104.11 ▼0.15104.56 ▲2.9248.44 ▲0.16

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/embed-charts/settingslib.php+37
    Undefined property: stdClass::$default
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× 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/embed-charts/embed-charts.php:31

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

embed-charts/embed-charts.php Passed 13 tests

"Embed Charts" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
64 characters long description:
Easily embed TradingView charts in Wordpress from just the link.

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
Success! There were no dangerous files found in this plugin275 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2723275

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity16.00
▷ Minimum class complexity6.00
▷ Maximum class complexity26.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods939.13%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected