84% basketin

Code Review | Basketin

WordPress plugin Basketin scored84%from 54 tests.

About plugin

  • Plugin page: basketin
  • Plugin version: 0.1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 1, 2022
  • Latest release: Jun 19, 2023
  • Number of updates: 29
  • Update frequency: every 16.4 days
  • Top authors: komicho1996 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /731 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Basketin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.66 ▲0.28
Dashboard /wp-admin3.32 ▼0.0250.71 ▼19.51
Posts /wp-admin/edit.php3.38 ▲0.0252.71 ▼0.21
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.22 ▼17.01
Media Library /wp-admin/upload.php3.25 ▲0.0238.47 ▼2.67

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 35 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Basketin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.70 ▲0.332.22 ▲0.3241.74 ▲0.40
Dashboard /wp-admin2,198 ▲185.65 ▼0.0490.25 ▲2.6636.71 ▼1.05
Posts /wp-admin/edit.php2,097 ▼02.03 ▲0.0335.14 ▼0.9334.62 ▼4.68
Add New Post /wp-admin/post-new.php1,545 ▲1922.95 ▲5.27658.40 ▼22.6755.56 ▲4.87
Media Library /wp-admin/upload.php1,403 ▲34.20 ▼0.0399.26 ▼15.7945.78 ▼2.04

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 fix the following items
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/basketin/src/Views/woo_setting.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/basketin/basketin.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
No plugin tags provided

basketin/basketin.php 92% from 13 tests

"Basketin" version 0.1.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "6.0")

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
Everything looks great! No dangerous files found in this plugin1,048 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP243372371,022
JSON20024
Markdown1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity6.94
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces7
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods84
▷ Static methods1517.86%
▷ Public methods8196.43%
▷ Protected methods00.00%
▷ Private methods33.57%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin