84% plotwp

Code Review | Plot.wp

WordPress plugin Plot.wp scored84%from 54 tests.

About plugin

  • Plugin page: plotwp
  • Plugin version: 0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2016
  • Latest release: Nov 16, 2016
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: paleolimbot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,278 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.05ms] Passed 4 tests

An overview of server-side resources used by Plot.wp
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.97 ▼1.09
Dashboard /wp-admin3.32 ▲0.0151.02 ▼3.64
Posts /wp-admin/edit.php3.37 ▲0.0156.01 ▼0.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0192.81 ▼14.88
Media Library /wp-admin/upload.php3.24 ▲0.0138.76 ▲0.40

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Plot.wp
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6318.90 ▲4.1770.81 ▲69.0645.97 ▼1.98
Dashboard /wp-admin2,198 ▲245.61 ▼0.0393.11 ▼1.3038.58 ▼9.63
Posts /wp-admin/edit.php2,103 ▲32.00 ▲0.0139.59 ▼2.6436.14 ▼2.25
Add New Post /wp-admin/post-new.php1,535 ▲718.29 ▼2.94655.12 ▼13.2972.03 ▲17.73
Media Library /wp-admin/upload.php1,394 ▼94.17 ▼0.07114.47 ▲10.9141.75 ▼3.52

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plotwp/plotwp/plotwp.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/plotwp/plotwp.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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 require attention:
  • Screenshots: Please add an image for screenshot #1 (A plot created with the `[plotly]...[/plotly]` shortcode.)
Please take inspiration from this readme.txt

plotwp/plotwp.php Passed 13 tests

The main file in "Plot.wp" v. 0.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
Add JSON-based plots to posts and pages using the plotly.js API

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
Success! There were no dangerous files found in this plugin131 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript10657
PHP281937
Markdown113033
CSS1104

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions8
▷ Named functions675.00%
▷ Anonymous functions225.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
2 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png44.30KB12.16KB▼ 72.56%
plotwp/screenshot-1.png44.30KB12.16KB▼ 72.56%