10% xlsx-viewer

Code Review | XLSXviewer

WordPress plugin XLSXviewer scored10%from 54 tests.

About plugin

  • Plugin page: xlsx-viewer
  • Plugin version: 2.1.0
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 9, 2023
  • Latest release: Aug 30, 2023
  • Number of updates: 27
  • Update frequency: every 4.7 days
  • Top authors: pitinca (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /462 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/xlsx-viewer/XLSXviewer.php+43
    Undefined variable: pagenow

Server metrics [RAM: ▼0.39MB] [CPU: ▼15.50ms] Passed 4 tests

An overview of server-side resources used by XLSXviewer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2940.96 ▼0.66
Dashboard /wp-admin3.65 ▲0.3444.91 ▼3.65
Posts /wp-admin/edit.php3.70 ▲0.3448.94 ▲3.32
Add New Post /wp-admin/post-new.php3.43 ▼2.4637.99 ▼61.01
Media Library /wp-admin/upload.php3.50 ▲0.2836.55 ▲5.56
File Management /wp-admin/admin.php?page=file_management3.4832.35
File Upload /wp-admin/admin.php?page=file_upload3.4728.70
Table Setting /wp-admin/admin.php?page=XLSXviewer3.4831.10

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_XLSXviewer
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for XLSXviewer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8414.74 ▲0.361.71 ▼0.0343.70 ▼1.17
Dashboard /wp-admin2,233 ▲485.79 ▲0.89109.77 ▼4.1278.38 ▲33.06
Posts /wp-admin/edit.php2,122 ▲331.99 ▼0.0640.46 ▲3.3437.56 ▲4.02
Add New Post /wp-admin/post-new.php1,559 ▲2623.39 ▲0.25688.91 ▲9.5452.28 ▼0.62
Media Library /wp-admin/upload.php1,412 ▲244.24 ▼0.07110.46 ▲9.9344.36 ▲0.64
File Management /wp-admin/admin.php?page=file_management8741.8724.7542.02
File Upload /wp-admin/admin.php?page=file_upload8531.8730.8729.76
Table Setting /wp-admin/admin.php?page=XLSXviewer8741.8726.4222.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed: The official readme.txt is a good inspiration

xlsx-viewer/XLSXviewer.php 85% from 13 tests

This is the main PHP file of "XLSXviewer" version 2.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("xlsx-viewer.php" instead of "XLSXviewer.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 422 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin5,621 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
SVG1002,671
PHP54294582,306
Markdown31620480
JavaScript21610102
CSS38736
JSON10026

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity54.33
▷ Minimum class complexity2.00
▷ Maximum class complexity178.00
Average method complexity5.44
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods73
▷ Static methods810.96%
▷ Public methods6183.56%
▷ Protected methods1216.44%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
img/XLSXviewer_icon_logo.png3.20KB1.97KB▼ 38.29%
img/XLSXviewer_icon.png1.64KB0.90KB▼ 44.97%