84% wp-plotly

Code Review | Plotly

WordPress plugin Plotly scored84%from 54 tests.

About plugin

  • Plugin page: wp-plotly
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: Feb 9, 2015
  • Latest release: Jul 10, 2015
  • Number of updates: 14
  • Update frequency: every 11.5 days
  • Top authors: andrefarzat (71.43%)scjody (35.71%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,025 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼11.34ms] Passed 4 tests

Analyzing server-side resources used by Plotly
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.86 ▼2.69
Dashboard /wp-admin3.31 ▼0.0350.12 ▼19.51
Posts /wp-admin/edit.php3.36 ▲0.0150.09 ▼2.96
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.23 ▼20.18
Media Library /wp-admin/upload.php3.24 ▲0.0141.05 ▲6.35

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Plotly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.69 ▲0.341.52 ▼0.3243.54 ▼0.49
Dashboard /wp-admin2,198 ▲185.58 ▲0.0084.21 ▼12.9241.04 ▼2.93
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0434.22 ▼3.4530.69 ▼7.92
Add New Post /wp-admin/post-new.php1,526 ▼023.13 ▼0.07717.68 ▲50.7067.19 ▲10.08
Media Library /wp-admin/upload.php1,400 ▼04.16 ▲0.0299.53 ▼5.9741.68 ▼4.55

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-plotly/wp-plotly.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-plotly/trunk/wp-plotly.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === wp-plotly === )
Please take inspiration from this readme.txt

wp-plotly/wp-plotly.php Passed 13 tests

The main file in "Plotly" v. 1.0.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
33 characters long description:
Embed plotly graphs in your posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected48 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2221848

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin