83% winiship

Code Review | WiniShip

WordPress plugin WiniShip scored83%from 54 tests.

About plugin

  • Plugin page: winiship
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 20, 2022
  • Latest release: Nov 9, 2022
  • Number of updates: 6
  • Update frequency: every 34.7 days
  • Top authors: winiship (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /598 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.10MB] [CPU: ▼5.22ms] Passed 4 tests

This is a short check of server-side resources used by WiniShip
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.0938.72 ▼9.09
Dashboard /wp-admin3.40 ▲0.0945.85 ▼2.98
Posts /wp-admin/edit.php3.51 ▲0.1551.13 ▲2.45
Add New Post /wp-admin/post-new.php6.00 ▲0.1194.85 ▼4.05
Media Library /wp-admin/upload.php3.32 ▲0.0937.31 ▼4.77

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
winiship_settings
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WiniShip
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,932 ▲18613.95 ▼0.438.22 ▲6.3038.79 ▼7.25
Dashboard /wp-admin2,255 ▲675.80 ▲0.8997.61 ▼14.4038.53 ▼3.66
Posts /wp-admin/edit.php2,145 ▲562.05 ▼0.0645.53 ▲11.8038.54 ▲1.81
Add New Post /wp-admin/post-new.php1,535 ▲1223.53 ▲0.23606.16 ▼103.5253.77 ▲10.14
Media Library /wp-admin/upload.php1,440 ▲554.29 ▲0.0893.48 ▼7.5042.55 ▼1.37

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 were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/winiship/admin/partials/wini-ship-admin-display.php
    • > /wp-content/plugins/winiship/public/partials/wini-ship-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === winiship === )
The official readme.txt might help

winiship/wini-ship.php 85% from 13 tests

"WiniShip" version 1.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("winiship.php" instead of "wini-ship.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin406 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12184574400
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity4.29
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods37
▷ Static methods25.41%
▷ Public methods3286.49%
▷ Protected methods00.00%
▷ Private methods513.51%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants2
▷ Global constants2100.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
There were not PNG files found in your plugin