89% katapult

Code Review | Katapult

WordPress plugin Katapult scored 89% from 54 tests.

About plugin

  • Plugin page: katapult
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2021
  • Latest release: Sep 28, 2023
  • Number of updates: 48
  • Update frequency: every 17.0 days
  • Top authors: katelinjohnston (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active / 1,657 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
Installer ran successfully

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

A check of server-side resources used by Katapult
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0034.46 ▼5.24
Dashboard /wp-admin3.31 ▲0.0144.89 ▲2.13
Posts /wp-admin/edit.php3.42 ▲0.0745.61 ▼15.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.32 ▼8.87
Media Library /wp-admin/upload.php3.23 ▲0.0035.21 ▲2.46

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Katapult
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2914.48 ▲0.191.73 ▼0.0340.64 ▼0.67
Dashboard /wp-admin2,206 ▲154.84 ▼0.04111.77 ▲7.0643.04 ▼4.20
Posts /wp-admin/edit.php2,086 ▼62.03 ▲0.0638.99 ▼6.0335.75 ▼7.87
Add New Post /wp-admin/post-new.php1,534 ▲123.23 ▲0.07659.00 ▲67.8260.11 ▲1.20
Media Library /wp-admin/upload.php1,388 ▼34.18 ▲0.0294.05 ▲0.4539.50 ▼4.39

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

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 your attention:
  • Screenshots: These screenshots do not have images: #1 (Login to your wordpress admin portal Go to > WooCommerce > select Settings screenshot-1.(png|jpg|jpeg|gif).), #2 (Katapult, confirm that the environment is pointed towards sandbox for development and testing. screenshot-2.(png|jpg|jpeg|gif).), #3 (Katapult order cancellation screenshot-3.(png|jpg|jpeg|gif).), #4 (Katapult items cancellation screenshot-4.(png|jpg|jpeg|gif).), #5 (Katapult mark order to complete status screenshot-5.(png|jpg|jpeg|gif).), #6 (Mark bulk items to leasable and non leasable screenshot-6.(png|jpg|jpeg|gif).), #7 (Mark single item leasable using product edit. screenshot-7.(png|jpg|jpeg|gif).)
The official readme.txt might help

katapult/katapult.php 85% from 13 tests

The main file in "Katapult" v. 1.1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
There were no executable files found in this plugin752 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP1156236672
JavaScript42657
Markdown211023

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity39.50
▷ Minimum class complexity4.00
▷ Maximum class complexity75.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods42
▷ Static methods24.76%
▷ Public methods3992.86%
▷ Protected methods00.00%
▷ Private methods37.14%
Functions5
▷ Named functions120.00%
▷ Anonymous functions480.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
11 PNG files occupy 1.29MB with 0.69MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/Screenshot-1.png50.43KB24.24KB▼ 51.94%
assets/icon-128x128.png2.19KB1.20KB▼ 45.22%
assets/icon-256x256.png4.29KB2.17KB▼ 49.31%
assets/Screenshot-2.png31.09KB15.58KB▼ 49.89%
assets/Screenshot-6.png290.85KB85.12KB▼ 70.73%