84% spreadsheet-paste-block

Code Review | Spreadsheet Paste Block

WordPress plugin Spreadsheet Paste Block scored84%from 54 tests.

About plugin

  • Plugin page: spreadsheet-paste...
  • Plugin version: 1.0
  • PHP compatiblity: 7.3.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.14-6.2.2
  • WordPress version: 6.3.1
  • First release: Dec 31, 2022
  • Latest release: Jul 22, 2023
  • Number of updates: 7
  • Update frequency: every 29.1 days
  • Top authors: forlogos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,003 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
Install script ran successfully

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

A check of server-side resources used by Spreadsheet Paste Block
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0049.22 ▲4.74
Dashboard /wp-admin3.31 ▲0.0047.70 ▼3.24
Posts /wp-admin/edit.php3.36 ▲0.0046.38 ▼5.02
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.23 ▼12.09
Media Library /wp-admin/upload.php3.23 ▲0.0035.90 ▼0.23

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Spreadsheet Paste Block
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.351.97 ▼0.1343.06 ▼3.75
Dashboard /wp-admin2,198 ▲215.58 ▲0.0192.24 ▼7.9644.71 ▼0.31
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0135.65 ▲1.4033.47 ▼3.47
Add New Post /wp-admin/post-new.php6,194 ▲4,66818.77 ▼4.32991.16 ▲313.2638.20 ▼21.65
Media Library /wp-admin/upload.php1,400 ▲34.14 ▼0.0695.39 ▼20.9541.66 ▼6.99

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/spreadsheet-paste-block/spreadsheet_paste.php:20

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

readme.txt Passed 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
6 plugin tags: sheets, paste, spreadsheet, blocks, excel...

spreadsheet-paste-block/spreadsheet_paste.php 92% from 13 tests

"Spreadsheet Paste Block" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("spreadsheet-paste-block.php" instead of "spreadsheet_paste.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin128 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript14056
PHP1142346
JSON11017
Markdown1609

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.76
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.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 images were found in this plugin